diff --git a/net/can/isotp.c b/net/can/isotp.c index 0476a506d4a4..fc81d77724a1 100644 --- a/net/can/isotp.c +++ b/net/can/isotp.c @@ -1152,6 +1152,10 @@ static int isotp_release(struct socket *sock) /* wait for complete transmission of current pdu */ wait_event_interruptible(so->wait, so->tx.state == ISOTP_IDLE); + /* force state machines to be idle also when a signal occurred */ + so->tx.state = ISOTP_IDLE; + so->rx.state = ISOTP_IDLE; + spin_lock(&isotp_notifier_lock); while (isotp_busy_notifier == so) { spin_unlock(&isotp_notifier_lock);