This is a note to let you know that I've just added the patch titled

    Staging: rtl8192su: check for skb == NULL

to the 2.6.32-longterm tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.32.git;a=summary

The filename of the patch is:
     staging-rtl8192su-check-for-skb-null.patch
and it can be found in the queue-2.6.32 subdirectory.

If you, or anyone else, feels it should not be added to the 2.6.32 longterm 
tree,
please let <[email protected]> know about it.


>From 1e118f1bc1d7a79cf41a89a4f7c7629742577c2c Mon Sep 17 00:00:00 2001
From: Florian Schilhabel <[email protected]>
Date: Tue, 4 May 2010 14:23:43 +0200
Subject: Staging: rtl8192su: check for skb == NULL

From: Florian Schilhabel <[email protected]>

commit 199ef62a287b429a8fa3b7dc5ae6b69f607bf324 upstream.

added 2 checks for skb == NULL.
plus cosmetics

Signed-off-by: Florian Schilhabel <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
[bwh: Remove cosmetic changes]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/rtl8192su/r8192S_firmware.c |    5 +++++
 drivers/staging/rtl8192su/r819xU_cmdpkt.c   |    6 ++++++
 2 files changed, 11 insertions(+)

--- a/drivers/staging/rtl8192su/r8192S_firmware.c
+++ b/drivers/staging/rtl8192su/r8192S_firmware.c
@@ -68,6 +68,11 @@ bool FirmwareDownloadCode(struct net_dev
 
                /* Allocate skb buffer to contain firmware info and tx 
descriptor info. */
                skb  = dev_alloc_skb(frag_length);
+               if (skb == NULL) {
+                       RT_TRACE(COMP_ERR, "(%s): unable to alloc skb buffer\n",
+                                                               __func__);
+                       goto cmdsend_downloadcode_fail;
+               }
                memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev));
 
                tcb_desc = (cb_desc*)(skb->cb + MAX_DEV_ADDR_SIZE);
--- a/drivers/staging/rtl8192su/r819xU_cmdpkt.c
+++ b/drivers/staging/rtl8192su/r819xU_cmdpkt.c
@@ -56,6 +56,12 @@ SendTxCommandPacket(
 
        //Get TCB and local buffer from common pool. (It is shared by CmdQ, 
MgntQ, and USB coalesce DataQ)
        skb  = dev_alloc_skb(USB_HWDESC_HEADER_LEN + DataLen + 4);
+       if (skb == NULL) {
+               RT_TRACE(COMP_ERR, "(%s): unable to alloc skb buffer\n",
+                                                               __func__);
+               rtStatus = false;
+               return rtStatus;
+       }
        memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev));
        tcb_desc = (cb_desc*)(skb->cb + MAX_DEV_ADDR_SIZE);
        tcb_desc->queue_index = TXCMD_QUEUE;


Patches currently in longterm-queue-2.6.32 which might be from 
[email protected] are

/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/staging-rtl8192su-add-device-ids.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/staging-rtl8192su-remove-device-ids.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/staging-rtl8192su-check-for-skb-null.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to