netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Lizhi Xu <lizhi.xu@windriver.com>
Cc: <alex.aring@gmail.com>,  <davem@davemloft.net>,
	 <dmantipov@yandex.ru>, <edumazet@google.com>,
	 <horms@kernel.org>,  <kuba@kernel.org>,
	<linux-kernel@vger.kernel.org>,  <linux-usb@vger.kernel.org>,
	<linux-wpan@vger.kernel.org>,  <netdev@vger.kernel.org>,
	<pabeni@redhat.com>,  <stefan@datenfreihafen.org>,
	<syzbot+985f827280dc3a6e7e92@syzkaller.appspotmail.com>,
	<syzkaller-bugs@googlegroups.com>
Subject: Re: [PATCH] mac802154: add a check for slave data list before delete
Date: Tue, 12 Nov 2024 12:01:21 +0100	[thread overview]
Message-ID: <87a5e4u35q.fsf@bootlin.com> (raw)
In-Reply-To: <20241112002134.2003089-1-lizhi.xu@windriver.com> (Lizhi Xu's message of "Tue, 12 Nov 2024 08:21:33 +0800")

On 12/11/2024 at 08:21:33 +08, Lizhi Xu <lizhi.xu@windriver.com> wrote:

> On Mon, 11 Nov 2024 20:46:57 +0100, Miquel Raynal wrote:
>> On 08/11/2024 at 22:54:20 +08, Lizhi Xu <lizhi.xu@windriver.com> wrote:
>> 
>> > syzkaller reported a corrupted list in ieee802154_if_remove. [1]
>> >
>> > Remove an IEEE 802.15.4 network interface after unregister an IEEE 802.15.4
>> > hardware device from the system.
>> >
>> > CPU0					CPU1
>> > ====					====
>> > genl_family_rcv_msg_doit		ieee802154_unregister_hw
>> > ieee802154_del_iface			ieee802154_remove_interfaces
>> > rdev_del_virtual_intf_deprecated	list_del(&sdata->list)
>> > ieee802154_if_remove
>> > list_del_rcu
>> 
>> FYI this is a "duplicate" but with a different approach than:
>> https://lore.kernel.org/linux-wpan/87v7wtpngj.fsf@bootlin.com/T/#m02cebe86ec0171fc4d3350676bbdd4a7e3827077
> No, my patch was the first to fix it, someone else copied my
> patch. Here is my patch:

Ok, so same question as to the other contributor, why not enclosing the
remaining list_del_rcu() within mutex protection? Can we avoid the
creation of the LISTDONE state bit?

Thanks,
Miquèl

  parent reply	other threads:[~2024-11-12 11:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06 16:53 [syzbot] [wpan?] [usb?] BUG: corrupted list in ieee802154_if_remove syzbot
2024-11-08 14:54 ` [PATCH] mac802154: add a check for slave data list before delete Lizhi Xu
2024-11-11 19:46   ` Miquel Raynal
2024-11-12  0:21     ` Lizhi Xu
2024-11-12  4:31       ` [syzbot] [wpan?] [usb?] BUG: corrupted list in ieee802154_if_remove syzbot
2024-11-12 11:01       ` Miquel Raynal [this message]
2024-11-12 13:41         ` [PATCH] mac802154: add a check for slave data list before delete Lizhi Xu
2024-11-13  8:26           ` Miquel Raynal
2024-11-13  9:51             ` [PATCH V2] mac802154: check local interfaces before deleting sdata list Lizhi Xu
2024-11-19 10:06               ` Stefan Schmidt
2024-11-13 10:29           ` [PATCH] mac802154: add a check for slave data list before delete Dmitry Antipov
2024-11-13 10:58             ` Miquel Raynal
2024-11-13 12:45               ` Dmitry Antipov
2024-11-14  1:00             ` Lizhi Xu
2024-11-14  1:17               ` 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=87a5e4u35q.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=alex.aring@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dmantipov@yandex.ru \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=lizhi.xu@windriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stefan@datenfreihafen.org \
    --cc=syzbot+985f827280dc3a6e7e92@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@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 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).