From: Mirko Lindner Date: Wed, 26 Nov 2014 14:13:38 +0000 (+0100) Subject: sky2: Fix crash inside sky2_rx_clean X-Git-Tag: omap-for-v3.19/fixes-rc1~125^2~107 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=799d2fff1858004526ad75d66a5dd8a5cce6ad40;p=pandora-kernel.git sky2: Fix crash inside sky2_rx_clean If sky2->tx_le = pci_alloc_consistent() or sky2->tx_ring = kcalloc() in sky2_alloc_buffers() fails, sky2->rx_ring = kcalloc() will never be called. In this error case handling, sky2_rx_clean() is called from within sky2_free_buffers(). In sky2_rx_clean() we find the following: ... memset(sky2->rx_le, 0, RX_LE_BYTES); ... This results in a memset using a NULL pointer and will crash the system. Signed-off-by: Mirko Lindner Acked-by: Stephen Hemminger Signed-off-by: David S. Miller --- Reading git-diff-tree failed