summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2019-01-11 12:20:41 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2019-01-22 11:35:33 +0100
commita55234dabe1f72cf22f9197980751d37e38ba020 (patch)
tree59d54b4d7bec40f628767be86b6efd107d4d02b8 /drivers/soc
parent7873e98c614aa8dd2c3429aa2e25dc0e9ccadffa (diff)
can: flexcan: fix NULL pointer exception during bringup
Commit cbffaf7aa09e ("can: flexcan: Always use last mailbox for TX") introduced a loop letting i run up to (including) ARRAY_SIZE(regs->mb) and in the body accessed regs->mb[i] which is an out-of-bounds array access that then resulted in an access to an reserved register area. Later this was changed by commit 0517961ccdf1 ("can: flexcan: Add provision for variable payload size") to iterate a bit differently but still runs one iteration too much resulting to call flexcan_get_mb(priv, priv->mb_count) which results in a WARN_ON and then a NULL pointer exception. This only affects devices compatible with "fsl,p1010-flexcan", "fsl,imx53-flexcan", "fsl,imx35-flexcan", "fsl,imx25-flexcan", "fsl,imx28-flexcan", so newer i.MX SoCs are not affected. Fixes: cbffaf7aa09e ("can: flexcan: Always use last mailbox for TX") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: linux-stable <stable@vger.kernel.org> # >= 4.20 Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/soc')
0 files changed, 0 insertions, 0 deletions