public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: syzbot <syzbot+02b16343704b3af1667e@syzkaller.appspotmail.com>,
	andreyknvl@gmail.com, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] WARNING in driver_unregister
Date: Sat, 28 May 2022 14:08:44 +0200	[thread overview]
Message-ID: <YpIQzJQzd93cWq4M@kroah.com> (raw)
In-Reply-To: <YpFEc5zeFK0AXa2q@rowland.harvard.edu>

On Fri, May 27, 2022 at 05:36:51PM -0400, Alan Stern wrote:
> On Fri, May 27, 2022 at 12:29:08PM -0700, syzbot wrote:
> > Hello,
> > 
> > syzbot has tested the proposed patch but the reproducer is still triggering an issue:
> > WARNING in sysfs_create_file_ns
> > 
> > really_probe: driver_sysfs_add(gadget.0) failed
> > ------------[ cut here ]------------
> > WARNING: CPU: 0 PID: 2361 at fs/sysfs/file.c:351 sysfs_create_file_ns+0x131/0x1c0 fs/sysfs/file.c:351
> > Modules linked in:
> > CPU: 0 PID: 2361 Comm: syz-executor.0 Not tainted 5.18.0-rc5-syzkaller-00157-g97fa5887cf28-dirty #0
> > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> > RIP: 0010:sysfs_create_file_ns+0x131/0x1c0 fs/sysfs/file.c:351
> > Code: e9 03 80 3c 01 00 75 7f 8b 4c 24 38 4d 89 e9 48 89 ee 48 8b 7b 30 44 8b 44 24 48 e8 e9 fa ff ff 41 89 c5 eb 0d e8 cf 7c 9d ff <0f> 0b 41 bd ea ff ff ff e8 c2 7c 9d ff 48 b8 00 00 00 00 00 fc ff
> > RSP: 0018:ffffc900028ffca0 EFLAGS: 00010293
> 
> Here's some extra detail, taken from the console log:
> 
> [   98.336685][ T2361] really_probe: driver_sysfs_add(gadget.0) failed
> [   98.336836][ T2360] sysfs: cannot create duplicate filename '/bus/gadget/drivers/dummy_udc'
> [   98.343498][ T2361] ------------[ cut here ]------------
> [   98.352154][ T2360] CPU: 1 PID: 2360 Comm: syz-executor.0 Not tainted 5.18.0-rc5-syzkaller-00157-g97fa5887cf28-dirty #0
> [   98.357802][ T2361] WARNING: CPU: 0 PID: 2361 at fs/sysfs/file.c:351 sysfs_create_file_ns+0x131/0x1c0
> 
> Simultaneous splats from two different threads trying to add drivers with 
> the same name suggests there might be a concurrency bug in the sysfs 
> filesystem.  This sort of thing should be an error but it shouldn't bring 
> the kernel to its knees.

It's not bringing anything down, it's just giving you a big fat warning
that the developer did something wrong and it should be fixed.  The
kernel should keep working just fine after this.

> Greg, do you know anyone who could take a look at this?  I don't know much 
> about sysfs.

It's not a sysfs thing, it's a "we should not register the same driver
name multiple times" thing, so that subsystem needs to be fixed to make
this always a unique name.

thanks,

greg k-h

  reply	other threads:[~2022-05-28 12:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27  9:25 [syzbot] WARNING in driver_unregister syzbot
2022-05-27 19:14 ` Alan Stern
2022-05-27 19:29   ` syzbot
2022-05-27 21:36     ` Alan Stern
2022-05-28 12:08       ` Greg KH [this message]
2022-05-28 14:45         ` Alan Stern
2022-05-28 15:02           ` syzbot
2022-05-28 16:26             ` Alan Stern
2022-05-28 17:02               ` syzbot
2022-05-28 17:23                 ` Alan Stern
2022-05-28 17:55                   ` syzbot
2022-05-28 20:22                     ` Alan Stern
2022-05-28 20:40                       ` syzbot
     [not found] <20220528023054.3646-1-hdanton@sina.com>
2022-05-28  2:53 ` syzbot

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=YpIQzJQzd93cWq4M@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andreyknvl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=syzbot+02b16343704b3af1667e@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