can: peak: fix bad memory access and free sequence
author추지호 <jiho.chu@samsung.com>
Thu, 8 Dec 2016 12:01:13 +0000 (12:01 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 8 Dec 2016 14:59:52 +0000 (15:59 +0100)
commitb67d0dd7d0dc9e456825447bbeb935d8ef43ea7c
tree3f1d235deb384e3526ad5fc7cefce46159d7df11
parentec988ad78ed6d184a7f4ca6b8e962b0e8f1de461
can: peak: fix bad memory access and free sequence

Fix for bad memory access while disconnecting. netdev is freed before
private data free, and dev is accessed after freeing netdev.

This makes a slub problem, and it raise kernel oops with slub debugger
config.

Signed-off-by: Jiho Chu <jiho.chu@samsung.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/peak_usb/pcan_usb_core.c