Commit 16a910a6 authored by Gregory Greenman's avatar Gregory Greenman Committed by Johannes Berg

cfg80211: handle failed skb allocation

Handle the case when dev_alloc_skb returns NULL.

Cc: stable@vger.kernel.org
Fixes: 2b67f944 ("cfg80211: reuse existing page fragments in A-MSDU rx")
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
parent 6e8ef842
...@@ -721,6 +721,8 @@ __ieee80211_amsdu_copy(struct sk_buff *skb, unsigned int hlen, ...@@ -721,6 +721,8 @@ __ieee80211_amsdu_copy(struct sk_buff *skb, unsigned int hlen,
* alignment since sizeof(struct ethhdr) is 14. * alignment since sizeof(struct ethhdr) is 14.
*/ */
frame = dev_alloc_skb(hlen + sizeof(struct ethhdr) + 2 + cur_len); frame = dev_alloc_skb(hlen + sizeof(struct ethhdr) + 2 + cur_len);
if (!frame)
return NULL;
skb_reserve(frame, hlen + sizeof(struct ethhdr) + 2); skb_reserve(frame, hlen + sizeof(struct ethhdr) + 2);
skb_copy_bits(skb, offset, skb_put(frame, cur_len), cur_len); skb_copy_bits(skb, offset, skb_put(frame, cur_len), cur_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment