]> git.baikalelectronics.ru Git - kernel.git/commit
rtlwifi: Fix error when accessing unmapped memory in skb
authorLarry Finger <Larry.Finger@lwfinger.net>
Wed, 31 Dec 2014 03:33:07 +0000 (21:33 -0600)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 5 Jan 2015 08:05:44 +0000 (10:05 +0200)
commit96c9c20a91a9db7be46f6b46161a78fb77d889ed
treef3c3eff86b136edf1890099ffc184b61db05fd4c
parentd34d070a3530dd1ff2bbb73a1dd7fefb2e4d2b4c
rtlwifi: Fix error when accessing unmapped memory in skb

These drivers use 9100-byte receive buffers, thus allocating an skb requires
an O(3) memory allocation. Under heavy memory loads and fragmentation, such
a request can fail. Previous versions of the driver have dropped the packet
and reused the old buffer; however, the new version introduced a bug in that
it released the old buffer before trying to allocate a new one. The previous
method is implemented here. The skb is unmapped before any attempt is made to
allocate another.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [v3.18]
Reported-by: Eric Biggers <ebiggers3@gmail.com>
Cc: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rtlwifi/pci.c