From: Sergei Shtylyov Date: Mon, 7 Mar 2016 22:36:28 +0000 (+0300) Subject: sh_eth: fix NULL pointer dereference in sh_eth_ring_format() X-Git-Tag: v3.2.80~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e0784b636cc75d81c870fde19cfbd7a58267edf;p=pandora-kernel.git sh_eth: fix NULL pointer dereference in sh_eth_ring_format() [ Upstream commit c1b7fca65070bfadca94dd53a4e6b71cd4f69715 ] 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 Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed