1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Mon, 13 Jan 2020 18:34:31 +0100
3 Subject: [PATCH] cfg80211: fix page refcount issue in A-MSDU decap
5 The fragments attached to a skb can be part of a compound page. In that case,
6 page_ref_inc will increment the refcount for the wrong page. Fix this by
7 using get_page instead, which calls page_ref_inc on the compound head and
8 also checks for overflow.
10 Fixes: 2b67f944f88c ("cfg80211: reuse existing page fragments in A-MSDU rx")
11 Cc: stable@vger.kernel.org
12 Signed-off-by: Felix Fietkau <nbd@nbd.name>
15 --- a/net/wireless/util.c
16 +++ b/net/wireless/util.c
17 @@ -564,7 +564,7 @@ __frame_add_frag(struct sk_buff *skb, st
18 struct skb_shared_info *sh = skb_shinfo(skb);
23 page_offset = ptr - page_address(page);
24 skb_add_rx_frag(skb, sh->nr_frags, page, page_offset, len, size);