diff options
author | Bryan Whitehead <Bryan.Whitehead@microchip.com> | 2019-03-11 13:39:39 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-19 13:11:52 +0100 |
commit | 01f0b5ee54f86de661ac8fa6728b27aef4e7f1f4 (patch) | |
tree | a7835b3fe1e582c1e24efcc24ff63951c751acd9 /sound | |
parent | d4bb36468873e5cd3805113f5a84fd7b356d5826 (diff) | |
download | linux-stable-01f0b5ee54f86de661ac8fa6728b27aef4e7f1f4.tar.gz linux-stable-01f0b5ee54f86de661ac8fa6728b27aef4e7f1f4.tar.bz2 linux-stable-01f0b5ee54f86de661ac8fa6728b27aef4e7f1f4.zip |
lan743x: Fix RX Kernel Panic
[ Upstream commit dd9d9f5907bb475f8b1796c47d4ecc7fb9b72136 ]
It has been noticed that running the speed test at
www.speedtest.net occasionally causes a kernel panic.
Investigation revealed that under this test RX buffer allocation
sometimes fails and returns NULL. But the lan743x driver did
not handle this case.
This patch fixes this issue by attempting to allocate a buffer
before sending the new rx packet to the OS. If the allocation
fails then the new rx packet is dropped and the existing buffer
is reused in the DMA ring.
Updates for v2:
Additional 2 locations where allocation was not checked,
has been changed to reuse existing buffer.
Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
Signed-off-by: Bryan Whitehead <Bryan.Whitehead@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions