]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: fix page refcount issue in A-MSDU decap
authorFelix Fietkau <nbd@nbd.name>
Mon, 13 Jan 2020 18:21:07 +0000 (19:21 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 15 Jan 2020 08:53:35 +0000 (09:53 +0100)
commit6cb8fa8082ec4e27664a7db82879e62dc3c5e76d
treef09acc26054ddbfb3e7410769fc5ea2544adb60a
parenta07f843085d5c3699422540348aae2d559df24a5
cfg80211: fix page refcount issue in A-MSDU decap

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: bf471a342047 ("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>
net/wireless/util.c