Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-13 Thread Lizhi Xu
On Thu, 14 Nov 2024 09:00:25 +0800, Lizhi Xu wrote: > On Wed, 13 Nov 2024 13:29:55 +0300, Dmitry Antipov wrote: > > On 11/12/24 4:41 PM, Lizhi Xu wrote: > > > > > mutex_lock(&sdata->local->iflist_mtx); > > > + if (list_empty(&sdata->local->interfaces)) { > > > + mutex_unlock(&sdat

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-13 Thread Lizhi Xu
On Wed, 13 Nov 2024 13:29:55 +0300, Dmitry Antipov wrote: > On 11/12/24 4:41 PM, Lizhi Xu wrote: > > > mutex_lock(&sdata->local->iflist_mtx); > > + if (list_empty(&sdata->local->interfaces)) { > > + mutex_unlock(&sdata->local->iflist_mtx); > > + return; > > + } > >

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-13 Thread Dmitry Antipov
On 11/13/24 1:58 PM, Miquel Raynal wrote: Note https://syzkaller.appspot.com/text?tag=ReproC&x=12a9f74058 makes an attempt to connect the only device. How this is expected to work if there are more than one device? Isn't sdata already specific enough? What do you mean by "device"? Well,

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-13 Thread Dmitry Antipov
On 11/12/24 4:41 PM, Lizhi Xu wrote: mutex_lock(&sdata->local->iflist_mtx); + if (list_empty(&sdata->local->interfaces)) { + mutex_unlock(&sdata->local->iflist_mtx); + return; + } list_del_rcu(&sdata->list); mutex_unlock(&sdata->loc

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-13 Thread Miquel Raynal
On 13/11/2024 at 13:29:55 +03, Dmitry Antipov wrote: > On 11/12/24 4:41 PM, Lizhi Xu wrote: > >> mutex_lock(&sdata->local->iflist_mtx); >> +if (list_empty(&sdata->local->interfaces)) { >> +mutex_unlock(&sdata->local->iflist_mtx); >> +return; >> +} >> list

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-13 Thread Miquel Raynal
On 12/11/2024 at 21:41:45 +08, Lizhi Xu wrote: > On Tue, 12 Nov 2024 12:01:21 +0100, Miquel Raynal wrote: >>On 12/11/2024 at 08:21:33 +08, Lizhi Xu wrote: >> >>> On Mon, 11 Nov 2024 20:46:57 +0100, Miquel Raynal wrote: On 08/11/2024 at 22:54:20 +08, Lizhi Xu wrote: > syzkaller re

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-12 Thread Lizhi Xu
On Tue, 12 Nov 2024 12:01:21 +0100, Miquel Raynal wrote: >On 12/11/2024 at 08:21:33 +08, Lizhi Xu wrote: > >> On Mon, 11 Nov 2024 20:46:57 +0100, Miquel Raynal wrote: >>> On 08/11/2024 at 22:54:20 +08, Lizhi Xu wrote: >>> >>> > syzkaller reported a corrupted list in ieee802154_if_remove. [1] >>>

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-12 Thread Miquel Raynal
On 12/11/2024 at 08:21:33 +08, Lizhi Xu wrote: > On Mon, 11 Nov 2024 20:46:57 +0100, Miquel Raynal wrote: >> On 08/11/2024 at 22:54:20 +08, Lizhi Xu wrote: >> >> > syzkaller reported a corrupted list in ieee802154_if_remove. [1] >> > >> > Remove an IEEE 802.15.4 network interface after unregist

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-11 Thread Lizhi Xu
On Mon, 11 Nov 2024 20:46:57 +0100, Miquel Raynal wrote: > On 08/11/2024 at 22:54:20 +08, Lizhi Xu 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.

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-11 Thread Miquel Raynal
Hello, On 08/11/2024 at 22:54:20 +08, Lizhi Xu 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 >

[PATCH] mac802154: add a check for slave data list before delete

2024-11-08 Thread Lizhi Xu
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. CPU0CPU1 genl_family_rcv_msg_doit