Commit 8d7a5f00 authored by Oleksij Rempel's avatar Oleksij Rempel Committed by Marc Kleine-Budde
Browse files

can: j1939: transport: j1939_cancel_active_session(): use...

can: j1939: transport: j1939_cancel_active_session(): use hrtimer_try_to_cancel() instead of hrtimer_cancel()

This part of the code protected by lock used in the hrtimer as well.
Using hrtimer_cancel() will trigger dead lock.

Fixes: 9d71dd0c

 ("can: add support of SAE J1939 protocol")
Signed-off-by: default avatarOleksij Rempel <>
parent 62ebce1d
......@@ -2039,7 +2039,11 @@ int j1939_cancel_active_session(struct j1939_priv *priv, struct sock *sk)
active_session_list_entry) {
if (!sk || sk == session->sk) {
if (hrtimer_try_to_cancel(&session->txtimer) == 1)
if (hrtimer_try_to_cancel(&session->rxtimer) == 1)
session->err = ESHUTDOWN;
Supports Markdown
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