staging: fsl-dpaa2/eth: Fix incorrect kfree
authorIoana Radulescu <ruxandra.radulescu@nxp.com>
Wed, 14 Mar 2018 20:04:51 +0000 (15:04 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2018 18:46:51 +0000 (19:46 +0100)
commit6a9bbe53db9a5aa0be9788aa8a2c250dee55444b
tree20024210f9204505e18f14a0f4c8b4fc315178a3
parentbcb4f0d75bde920a3e86eeea743c6002863455fb
staging: fsl-dpaa2/eth: Fix incorrect kfree

Use netdev_alloc_frag() instead of kmalloc to allocate space for
the S/G table of egress multi-buffer frames.

This fixes a bug where an unaligned pointer received from the
allocator would be overwritten with the 64B aligned value,
leading to a wrong address being later passed to kfree.

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