]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Jan 2020 11:18:25 +0000 (12:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Jan 2020 11:18:25 +0000 (12:18 +0100)
added patches:
cfg80211-fix-page-refcount-issue-in-a-msdu-decap.patch

queue-4.14/cfg80211-fix-page-refcount-issue-in-a-msdu-decap.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/cfg80211-fix-page-refcount-issue-in-a-msdu-decap.patch b/queue-4.14/cfg80211-fix-page-refcount-issue-in-a-msdu-decap.patch
new file mode 100644 (file)
index 0000000..4aeaa7d
--- /dev/null
@@ -0,0 +1,36 @@
+From 81c044fc3bdc5b7be967cd3682528ea94b58c06a Mon Sep 17 00:00:00 2001
+From: Felix Fietkau <nbd@nbd.name>
+Date: Mon, 13 Jan 2020 19:21:07 +0100
+Subject: cfg80211: fix page refcount issue in A-MSDU decap
+
+From: Felix Fietkau <nbd@nbd.name>
+
+commit 81c044fc3bdc5b7be967cd3682528ea94b58c06a upstream.
+
+The fragments attached to a skb can be part of a compound page. In that case,
+page_ref_inc will increment the refcount for the wrong page. Fix this by
+using get_page instead, which calls page_ref_inc on the compound head and
+also checks for overflow.
+
+Fixes: 2b67f944f88c ("cfg80211: reuse existing page fragments in A-MSDU rx")
+Cc: stable@vger.kernel.org
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+Link: https://lore.kernel.org/r/20200113182107.20461-1-nbd@nbd.name
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/wireless/util.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/wireless/util.c
++++ b/net/wireless/util.c
+@@ -652,7 +652,7 @@ __frame_add_frag(struct sk_buff *skb, st
+       struct skb_shared_info *sh = skb_shinfo(skb);
+       int page_offset;
+-      page_ref_inc(page);
++      get_page(page);
+       page_offset = ptr - page_address(page);
+       skb_add_rx_frag(skb, sh->nr_frags, page, page_offset, len, size);
+ }
index c660ae23e03c5bddd44479c188fb77a165e9a7c6..aa8b268a4b34bbde4e547b36e1d8287e7690616b 100644 (file)
@@ -33,3 +33,4 @@ usb-serial-io_edgeport-handle-unbound-ports-on-urb-c.patch
 mm-huge_memory.c-make-__thp_get_unmapped_area-static.patch
 mm-huge_memory.c-thp-fix-conflict-of-above-47bit-hin.patch
 arm64-dts-agilex-stratix10-fix-pmu-interrupt-numbers.patch
+cfg80211-fix-page-refcount-issue-in-a-msdu-decap.patch