]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:30:11 +0000 (12:30 +0200)
commit9ccc0d24b8c446360cd50bd17404b68d4a6e0dcc
treeb2b1c043a924ce924f452fa13fd3be6d92baed7c
parentd6608ee5b0b9338dbac31c4169707cd553de6414
staging: fsl-dpaa2/eth: Fix incorrect kfree

BugLink: http://bugs.launchpad.net/bugs/1783418
[ Upstream commit 6a9bbe53db9a5aa0be9788aa8a2c250dee55444b ]

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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c