android_kernel_samsung_msm8976/drivers/net/ethernet/renesas
Sergei Shtylyov 0babba1b59 sh_eth: fix NULL pointer dereference in sh_eth_ring_format()
commit c1b7fca65070bfadca94dd53a4e6b71cd4f69715 upstream.

In a low memory situation, if netdev_alloc_skb() fails on a first RX ring
loop iteration  in sh_eth_ring_format(), 'rxdesc' is still NULL.  Avoid
kernel oops by adding the 'rxdesc' check after the loop.

Reported-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2016-06-07 10:42:49 +02:00
..
Kconfig
Makefile
sh_eth.c sh_eth: fix NULL pointer dereference in sh_eth_ring_format() 2016-06-07 10:42:49 +02:00
sh_eth.h