]> git.baikalelectronics.ru Git - kernel.git/commit
staging: fsl-dpaa2/eth: Fix double DMA unmap
authorIoana Radulescu <ruxandra.radulescu@nxp.com>
Wed, 11 Oct 2017 13:29:48 +0000 (08:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Oct 2017 14:45:18 +0000 (16:45 +0200)
commit7d2103dc0825c125ac3e80d43029ffdcf5ca4721
tree10b679a17bde9867ef6cc42661db58678c3d09cb
parent9f92dfa60e3ca2ee53591aba3fcec8901ba5a1ea
staging: fsl-dpaa2/eth: Fix double DMA unmap

In case we fail to allocate a skb for a fragmented ingress
frame, the cleanup function will attempt to unmap again the
first frame fragment, which had already been unmapped during
early Rx processing.

Avoid this by freeing the first buffer immediately in case
we hit an error, leaving the cleanup function to free only
the subsequent buffers.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c