Patch "mwifiex: add NULL check for PCIe Rx skb" has been added to the 3.13-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    mwifiex: add NULL check for PCIe Rx skb

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

The filename of the patch is:
     mwifiex-add-null-check-for-pcie-rx-skb.patch
and it can be found in the queue-3.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From bb8e6a1ee881d131e404f0f1f5e8dc9281002771 Mon Sep 17 00:00:00 2001
From: Amitkumar Karwar <akarwar@xxxxxxxxxxx>
Date: Tue, 18 Feb 2014 15:41:55 -0800
Subject: mwifiex: add NULL check for PCIe Rx skb

From: Amitkumar Karwar <akarwar@xxxxxxxxxxx>

commit bb8e6a1ee881d131e404f0f1f5e8dc9281002771 upstream.

We may get a NULL pointer here if skb allocation for Rx packet
was failed earlier.

Signed-off-by: Amitkumar Karwar <akarwar@xxxxxxxxxxx>
Signed-off-by: Bing Zhao <bzhao@xxxxxxxxxxx>
Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/net/wireless/mwifiex/pcie.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/net/wireless/mwifiex/pcie.c
+++ b/drivers/net/wireless/mwifiex/pcie.c
@@ -1211,6 +1211,12 @@ static int mwifiex_pcie_process_recv_dat
 		rd_index = card->rxbd_rdptr & reg->rx_mask;
 		skb_data = card->rx_buf_list[rd_index];
 
+		/* If skb allocation was failed earlier for Rx packet,
+		 * rx_buf_list[rd_index] would have been left with a NULL.
+		 */
+		if (!skb_data)
+			return -ENOMEM;
+
 		MWIFIEX_SKB_PACB(skb_data, &buf_pa);
 		pci_unmap_single(card->dev, buf_pa, MWIFIEX_RX_DATA_BUF_SIZE,
 				 PCI_DMA_FROMDEVICE);


Patches currently in stable-queue which might be from akarwar@xxxxxxxxxxx are

queue-3.13/mwifiex-add-null-check-for-pcie-rx-skb.patch
queue-3.13/mwifiex-save-and-copy-ap-s-vht-capability-info-correctly.patch
queue-3.13/mwifiex-do-not-advertise-usb-autosuspend-support.patch
queue-3.13/mwifiex-fix-cmd-and-tx-data-timeout-issue-for-pcie-cards.patch
queue-3.13/mwifiex-copy-ap-s-ht-capability-info-correctly.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]