diff options
author | Gregory Greenman <gregory.greenman@intel.com> | 2016-07-05 15:23:10 +0300 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2016-07-06 13:52:18 +0200 |
commit | 16a910a6722b7a8680409e634c7c0dac073c01e4 (patch) | |
tree | 525e06594696ec392858adac3ccea73323fdcd3f /net | |
parent | 6e8ef842223b90a33efd570128bb566a9ae6f5ad (diff) | |
download | lwn-16a910a6722b7a8680409e634c7c0dac073c01e4.tar.gz lwn-16a910a6722b7a8680409e634c7c0dac073c01e4.zip |
cfg80211: handle failed skb allocation
Handle the case when dev_alloc_skb returns NULL.
Cc: stable@vger.kernel.org
Fixes: 2b67f944f88c2 ("cfg80211: reuse existing page fragments in A-MSDU rx")
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 2443ee30ba5b..b7d1592bd5b8 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -721,6 +721,8 @@ __ieee80211_amsdu_copy(struct sk_buff *skb, unsigned int hlen, * alignment since sizeof(struct ethhdr) is 14. */ frame = dev_alloc_skb(hlen + sizeof(struct ethhdr) + 2 + cur_len); + if (!frame) + return NULL; skb_reserve(frame, hlen + sizeof(struct ethhdr) + 2); skb_copy_bits(skb, offset, skb_put(frame, cur_len), cur_len); |