Home
last modified time | relevance | path

Searched hist:c97c52be (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/can/c_can/
H A Dc_can_pci.cc97c52be Fri Aug 12 06:50:41 CDT 2016 Einar Jón <tolvupostur@gmail.com> can: c_can_pci: fix null-pointer-deref in c_can_start() - set device pointer

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>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
c97c52be Fri Aug 12 06:50:41 CDT 2016 Einar Jón <tolvupostur@gmail.com> can: c_can_pci: fix null-pointer-deref in c_can_start() - set device pointer

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>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>