can: c_can: don't call pm_runtime_get_sync() from interrupt context
commit e35d46ad upstream. 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:Andrew Glen <AGlen@bepmarine.com> Tested-by:
Andrew Glen <AGlen@bepmarine.com> Signed-off-by:
Andrew Glen <AGlen@bepmarine.com> Signed-off-by:
Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment