From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
Stefan Bader <stefan.bader@canonical.com>,
Tim Gardner <tim.gardner@canonical.com>,
Steve Conklin <steve.conklin@canonical.com>
Subject: [patch 5/9] Fix incorrect stable backport to bas_gigaset
Date: Thu, 01 Oct 2009 16:16:38 -0700 [thread overview]
Message-ID: <20091001231805.170427311@mini.kroah.org> (raw)
In-Reply-To: <20091001231938.GA29593@kroah.com>
[-- Attachment #1: fix-incorrect-stable-backport-to-bas_gigaset.patch --]
[-- Type: text/plain, Size: 1583 bytes --]
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tilman Schmidt <tilman@imap.cc>
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 <stefan.bader@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Steve Conklin <steve.conklin@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
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
*/
next prev parent reply other threads:[~2009-10-01 23:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
2009-10-01 23:16 ` Greg KH
2009-10-01 23:16 ` [patch 1/9] fs: make sure data stored into inode is properly seen before unlocking new inode Greg KH
2009-10-01 23:16 ` [patch 2/9] p54usb: add Zcomax XG-705A usbid Greg KH
2009-10-01 23:16 ` [patch 3/9] enc28j60: fix RX buffer overflow Greg KH
2009-10-01 23:16 ` [patch 4/9] pcnet_cs: Fix misuse of the equality operator Greg KH
2009-10-01 23:16 ` Greg KH [this message]
2009-10-01 23:16 ` [patch 6/9] net ax25: Fix signed comparison in the sockopt handler Greg KH
2009-10-01 23:16 ` [patch 7/9] net: Make the copy length in af_packet sockopt handler unsigned Greg KH
2009-10-01 23:16 ` [patch 8/9] netfilter: bridge: refcount fix Greg KH
2009-10-01 23:16 ` [patch 9/9] hugetlb: restore interleaving of bootmem huge pages (2.6.31) Greg KH
2009-10-02 17:49 ` [patch 10/09] mm: fix anonymous dirtying Greg KH
2009-10-02 17:50 ` [patch 11/09] mmap: avoid unnecessary anon_vma lock acquisition in vma_adjust() Greg KH
2009-10-02 17:50 ` [patch 0/9] 2.6.27.36-stable review Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091001231805.170427311@mini.kroah.org \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=stable-review@kernel.org \
--cc=stable@kernel.org \
--cc=stefan.bader@canonical.com \
--cc=steve.conklin@canonical.com \
--cc=tim.gardner@canonical.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox