summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorSimon Guinot <simon.guinot@sequanux.org>2015-07-19 13:00:53 +0200
committerLuis Henriques <luis.henriques@canonical.com>2015-08-11 09:57:35 +0100
commitf2d4feacc72347fac210b471d32765fc7afbfdc4 (patch)
treeb69806bc4f8e0fc6ca9ca23b28fec97ea9f72450 /include/uapi
parent54f22a7f92c33ad342693b1cac549c9b7a324273 (diff)
net: mvneta: fix refilling for Rx DMA buffers
commit a84e32894191cfcbffa54180d78d7d4654d56c20 upstream. With the actual code, if a memory allocation error happens while refilling a Rx descriptor, then the original Rx buffer is both passed to the networking stack (in a SKB) and let in the Rx ring. This leads to various kernel oops and crashes. As a fix, this patch moves Rx descriptor refilling ahead of building SKB with the associated Rx buffer. In case of a memory allocation failure, data is dropped and the original DMA buffer is put back into the Rx ring. Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit") Tested-by: Yoann Sculo <yoann@sculo.fr> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions