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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Dec 2016 16:49:22 +0000 (08:49 -0800)
commite29949ed3903930e38dead204b01e7912c98fe33
treec1594dc4329cf0bc6612ee7a903bca6ae83e2e04
parent083021bdba1e6d480170a4ae86cddc10f88c54d5
can: peak: fix bad memory access and free sequence

commit b67d0dd7d0dc9e456825447bbeb935d8ef43ea7c upstream.

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>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/usb/peak_usb/pcan_usb_core.c