Skip to content
Commit e35d46ad authored by Marc Kleine-Budde's avatar Marc Kleine-Budde
Browse files

can: c_can: don't call pm_runtime_get_sync() from interrupt context



The c_can driver contians a callpath (c_can_poll -> c_can_state_change ->
c_can_get_berr_counter) which may call pm_runtime_get_sync() from the IRQ
handler, which is not allowed and results in "BUG: scheduling while atomic".

This problem is fixed by introducing __c_can_get_berr_counter, which will not
call pm_runtime_get_sync().

Reported-by: default avatarAndrew Glen <AGlen@bepmarine.com>
Tested-by: default avatarAndrew Glen <AGlen@bepmarine.com>
Signed-off-by: default avatarAndrew Glen <AGlen@bepmarine.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 2fea6cd3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment