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

Lizhi Xu <[email protected]>
Newsgroups org.kernel.vger.linux-wpan,org.kernel.vger.linux-kernel,org.kernel.vger.linux-usb,org.kernel.vger.netdev
Message-ID <[email protected]>
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;
> > +	}
> >   	list_del_rcu(&sdata->list);
> >   	mutex_unlock(&sdata->local->iflist_mtx);
> 
> Note https://syzkaller.appspot.com/text?tag=ReproC&x=12a9f740580000 makes an
> attempt to connect the only device. How this is expected to work if there are
> more than one device?
There are two locks (rtnl and iflist_mtx) to protection and synchronization
local->interfaces, so no need to worry about multiple devices.

Lizhi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.