mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 07:33:56 +00:00
mctp: serial: cancel tx work on ldisc close
We want to ensure that the tx work has finished before returning from the ldisc close op, so do a synchronous cancel. Reported-by: Jiri Slaby <jirislaby@kernel.org> Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
342e5f9fc7
commit
7bd9890f3d
@ -479,6 +479,7 @@ static void mctp_serial_close(struct tty_struct *tty)
|
||||
int idx = dev->idx;
|
||||
|
||||
unregister_netdev(dev->netdev);
|
||||
cancel_work_sync(&dev->tx_work);
|
||||
ida_free(&mctp_serial_ida, idx);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user