]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite1606fb1a987a556796bede7f132990b042d65c8
tree20024210f9204505e18f14a0f4c8b4fc315178a3
parent9ecf387d39181fece7a438c0dd42e726308ce05b
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