From: Jiri Slaby <jirislaby@kernel.org>
To: Jeremy Kerr <jk@codeconstruct.com.au>, netdev@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Matt Johnston <matt@codeconstruct.com.au>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH net-next 1/3] mctp: serial: cancel tx work on ldisc close
Date: Wed, 24 Nov 2021 06:36:50 +0100 [thread overview]
Message-ID: <b3307219-db82-d519-63df-dc246e11b037@kernel.org> (raw)
In-Reply-To: <20211123125042.2564114-2-jk@codeconstruct.com.au>
On 23. 11. 21, 13:50, Jeremy Kerr wrote:
> 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>
> ---
> drivers/net/mctp/mctp-serial.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/mctp/mctp-serial.c b/drivers/net/mctp/mctp-serial.c
> index 9ac0e187f36e..c958d773a82a 100644
> --- a/drivers/net/mctp/mctp-serial.c
> +++ b/drivers/net/mctp/mctp-serial.c
> @@ -478,6 +478,7 @@ static void mctp_serial_close(struct tty_struct *tty)
> struct mctp_serial *dev = tty->disc_data;
> int idx = dev->idx;
>
> + cancel_work_sync(&dev->tx_work);
But the work still can be queued after the cancel (and before the
unregister), right?
> unregister_netdev(dev->netdev);
> ida_free(&mctp_serial_ida, idx);
> }
>
thanks,
--
js
suse labs
next prev parent reply other threads:[~2021-11-24 5:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 12:50 [PATCH net-next 0/3] mctp serial minor fixes Jeremy Kerr
2021-11-23 12:50 ` [PATCH net-next 1/3] mctp: serial: cancel tx work on ldisc close Jeremy Kerr
2021-11-24 5:36 ` Jiri Slaby [this message]
2021-11-24 6:35 ` Jiri Slaby
2021-11-24 6:38 ` Jeremy Kerr
2021-11-25 5:43 ` Jiri Slaby
2021-11-25 5:55 ` Jeremy Kerr
2021-11-23 12:50 ` [PATCH net-next 2/3] mctp: serial: enforce fixed MTU Jeremy Kerr
2021-11-23 12:50 ` [PATCH net-next 3/3] mctp: serial: remove unnecessary ldisc data check Jeremy Kerr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b3307219-db82-d519-63df-dc246e11b037@kernel.org \
--to=jirislaby@kernel.org \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=jk@codeconstruct.com.au \
--cc=kuba@kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).