diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2012-01-07 20:46:40 -0600 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-24 14:08:37 -0500 |
commit | 76a92be537f1c8c259e393632301446257ca3ea9 (patch) | |
tree | 2b5e5b43f0eb4e16ac32b07254cb26383a0a0d35 /drivers/net/wireless/rtlwifi/rtl8192c | |
parent | 39d02a7d90602d4557ee05db2a157a4e0ec3a3d3 (diff) | |
download | blackbird-op-linux-76a92be537f1c8c259e393632301446257ca3ea9.tar.gz blackbird-op-linux-76a92be537f1c8c259e393632301446257ca3ea9.zip |
rtlwifi: rtl8192c_common: rtl8192de: Check for allocation failures
In https://bugzilla.redhat.com/show_bug.cgi?id=771656, a kernel bug was
triggered due to a failed skb allocation that was not checked. This event
lead to an audit of all memory allocations in the complete rtlwifi family
of drivers. This patch fixes the rest.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c index 1eae3baae518..e9e9c26d4963 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c +++ b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c @@ -785,6 +785,8 @@ void rtl92c_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool dl_finished) skb = dev_alloc_skb(totalpacketlen); + if (!skb) + return; memcpy((u8 *) skb_put(skb, totalpacketlen), &reserved_page_packet, totalpacketlen); |