From: Jakub Kicinski <kuba@kernel.org>
To: Lizhi Xu <lizhi.xu@windriver.com>
Cc: <samsun1006219@gmail.com>, <ahmed.zaki@intel.com>,
<aleksander.lobakin@intel.com>, <davem@davemloft.net>,
<edumazet@google.com>, <horms@kernel.org>, <kuniyu@amazon.com>,
<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<pabeni@redhat.com>, <sdf@fomichev.me>,
<syzkaller-bugs@googlegroups.com>, <syzkaller@googlegroups.com>
Subject: Re: [PATCH V3] usbnet: Prevents free active kevent
Date: Tue, 21 Oct 2025 18:32:52 -0700 [thread overview]
Message-ID: <20251021183252.2eb25aac@kernel.org> (raw)
In-Reply-To: <20251018144940.583693-1-lizhi.xu@windriver.com>
On Sat, 18 Oct 2025 22:49:40 +0800 Lizhi Xu wrote:
> --- a/drivers/net/usb/usbnet.c
> +++ b/drivers/net/usb/usbnet.c
> @@ -1672,6 +1672,9 @@ void usbnet_disconnect (struct usb_interface *intf)
> usb_free_urb(dev->interrupt);
> kfree(dev->padding_pkt);
>
> + cancel_work_sync(&dev->kevent);
> + timer_delete_sync(&dev->delay);
> +
> free_netdev(net);
Is this the best spot to place the cancel?
I think it may be better right after unregister_netdev().
I haven't analyze this driver too closely but for example since
kevent may call the sub-driver having it running after we already
called dev->driver_info->unbind() seems risky.
--
pw-bot: cr
next prev parent reply other threads:[~2025-10-22 1:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-18 14:49 [PATCH V3] usbnet: Prevents free active kevent Lizhi Xu
2025-10-22 1:32 ` Jakub Kicinski [this message]
2025-10-22 2:29 ` Lizhi Xu
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=20251021183252.2eb25aac@kernel.org \
--to=kuba@kernel.org \
--cc=ahmed.zaki@intel.com \
--cc=aleksander.lobakin@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuniyu@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhi.xu@windriver.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=samsun1006219@gmail.com \
--cc=sdf@fomichev.me \
--cc=syzkaller-bugs@googlegroups.com \
--cc=syzkaller@googlegroups.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.