From: Greg Kroah-Hartman Date: Thu, 1 Oct 2009 15:34:13 +0000 (-0700) Subject: another .27 patch to hopefully resolve a backport problem X-Git-Tag: v2.6.27.36~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bbcd741b3ed16b438cc9a70ec6196df1e0c70aee;p=thirdparty%2Fkernel%2Fstable-queue.git another .27 patch to hopefully resolve a backport problem --- diff --git a/queue-2.6.27/fix-incorrect-stable-backport-to-bas_gigaset.patch b/queue-2.6.27/fix-incorrect-stable-backport-to-bas_gigaset.patch new file mode 100644 index 00000000000..69318d8e708 --- /dev/null +++ b/queue-2.6.27/fix-incorrect-stable-backport-to-bas_gigaset.patch @@ -0,0 +1,57 @@ +From 55559d69f6a84ae295e8a1b0cbabc7d6c7e5f18a Mon Sep 17 00:00:00 2001 +From: Tilman Schmidt +Date: Tue, 25 Aug 2009 17:35:56 +0200 +Subject: Fix incorrect stable backport to bas_gigaset + +From: Tilman Schmidt + +bas_gigaset: correctly allocate USB interrupt transfer buffer + +[ Upstream commit 170ebf85160dd128e1c4206cc197cce7d1424705 ] + +This incorrect backport to 2.6.28.10 placed some code into the probe function +which used a pointer before it was initialized. Moving this to the correct +place (as it is in upstream). + +Signed-off-by: Stefan Bader +Acked-by: Tim Gardner +Acked-by: Steve Conklin +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/isdn/gigaset/bas-gigaset.c | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +--- a/drivers/isdn/gigaset/bas-gigaset.c ++++ b/drivers/isdn/gigaset/bas-gigaset.c +@@ -2140,8 +2140,16 @@ static int gigaset_initcshw(struct cards + struct bas_cardstate *ucs; + + cs->hw.bas = ucs = kmalloc(sizeof *ucs, GFP_KERNEL); +- if (!ucs) ++ if (!ucs) { ++ pr_err("out of memory\n"); ++ return 0; ++ } ++ ucs->int_in_buf = kmalloc(IP_MSGSIZE, GFP_KERNEL); ++ if (!ucs->int_in_buf) { ++ kfree(ucs); ++ pr_err("out of memory\n"); + return 0; ++ } + + ucs->urb_cmd_in = NULL; + ucs->urb_cmd_out = NULL; +@@ -2236,12 +2244,6 @@ static int gigaset_probe(struct usb_inte + } + hostif = interface->cur_altsetting; + } +- ucs->int_in_buf = kmalloc(IP_MSGSIZE, GFP_KERNEL); +- if (!ucs->int_in_buf) { +- kfree(ucs); +- pr_err("out of memory\n"); +- return 0; +- } + + /* Reject application specific interfaces + */ diff --git a/queue-2.6.27/series b/queue-2.6.27/series index 0b31a0095f8..a1a834fbd83 100644 --- a/queue-2.6.27/series +++ b/queue-2.6.27/series @@ -2,3 +2,4 @@ fs-make-sure-data-stored-into-inode-is-properly-seen-before-unlocking-new-inode. p54usb-add-zcomax-xg-705a-usbid.patch enc28j60-fix-rx-buffer-overflow.patch pcnet_cs-fix-misuse-of-the-equality-operator.patch +fix-incorrect-stable-backport-to-bas_gigaset.patch