]> git.hungrycats.org Git - linux/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jan 2015 16:29:36 +0000 (08:29 -0800)
commit42e62067a895b890ce9c3510747b0f5f90732acd
treeefd3253409b334f4e2042cfd74b3aee84b589dd9
parent7d01c211a8694f4d7f7ed3b120e8f832c72d1fd2
rtlwifi: Fix error when accessing unmapped memory in skb

commit e9538cf4f90713eca71b1d6a74b4eae1d445c664 upstream.

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>
Reported-by: Eric Biggers <ebiggers3@gmail.com>
Cc: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/rtlwifi/pci.c