Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1458084 > unrolled thread

[PATCH 4.6 92/96] cfg80211: handle failed skb allocation

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-08-08 21:30 +0200
Last post2016-08-08 21:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.6 92/96] cfg80211: handle failed skb allocation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-08 21:30 +0200

#1458084 — [PATCH 4.6 92/96] cfg80211: handle failed skb allocation

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-08-08 21:30 +0200
Subject[PATCH 4.6 92/96] cfg80211: handle failed skb allocation
Message-ID<s3Ypj-5wn-9@gated-at.bofh.it>
4.6-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Gregory Greenman <gregory.greenman@intel.com>

commit 16a910a6722b7a8680409e634c7c0dac073c01e4 upstream.

Handle the case when dev_alloc_skb returns NULL.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/wireless/util.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -721,6 +721,8 @@ __ieee80211_amsdu_copy(struct sk_buff *s
 	 * 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);

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web