android_kernel_lge_bullhead/drivers/net/can/c_can
Einar Jón 165cc0330b can: c_can_pci: fix null-pointer-deref in c_can_start() - set device pointer
commit c97c52be78b8463ac5407f1cf1f22f8f6cf93a37 upstream.

The priv->device pointer for c_can_pci is never set, but it is used
without a NULL check in c_can_start(). Setting it in c_can_pci_probe()
like c_can_plat_probe() prevents c_can_pci.ko from crashing, with and
without CONFIG_PM.

This might also cause the pm_runtime_*() functions in c_can.c to
actually be executed for c_can_pci devices - they are the only other
place where priv->device is used, but they all contain a null check.

Signed-off-by: Einar Jón <tolvupostur@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2017-06-20 14:03:12 +02:00
..
Kconfig can: Kconfig: convert 'depends on CAN_DEV' into 'if CAN_DEV...endif' block 2013-01-26 16:58:58 +01:00
Makefile c_can_pci: generic module for C_CAN/D_CAN on PCI 2012-06-19 21:22:28 +02:00
c_can.c can: c_can: don't call pm_runtime_get_sync() from interrupt context 2013-12-11 22:36:26 -08:00
c_can.h can: c_can: Add d_can raminit support 2012-11-27 09:49:31 +01:00
c_can_pci.c can: c_can_pci: fix null-pointer-deref in c_can_start() - set device pointer 2017-06-20 14:03:12 +02:00
c_can_platform.c can: remove __dev* attributes 2012-12-03 11:16:11 -08:00