All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Ming Lei <tom.leiming@gmail.com>
Cc: Tommi Rantala <tt.rantala@gmail.com>,
	Jens Axboe <axboe@kernel.dk>,
	Andrew Morton <akpm@linux-foundation.org>,
	Guo Chao <yan@linux.vnet.ibm.com>, Tejun Heo <tj@kernel.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Dave Jones <davej@redhat.com>
Subject: Re: kernel BUG at fs/sysfs/group.c:65!
Date: Sun, 10 Mar 2013 09:41:02 -0700	[thread overview]
Message-ID: <20130310164102.GD4392@kroah.com> (raw)
In-Reply-To: <CACVXFVNJR69B=0G59FEqnu4Vhpn0_S_gf8j+vdUG2+0oLSPi_Q@mail.gmail.com>

On Sun, Mar 10, 2013 at 04:53:11PM +0800, Ming Lei wrote:
> On Sun, Mar 10, 2013 at 12:36 AM, Tommi Rantala <tt.rantala@gmail.com> wrote:
> > [   40.089036]  [<ffffffff81222e29>] sysfs_get_dirent+0x39/0x80
> > [   40.089036]  [<ffffffff81224ad9>] sysfs_remove_group+0x29/0x100
> > [   40.089036]  [<ffffffff8113f2c4>] blk_trace_remove_sysfs+0x14/0x20
> > [   40.089036]  [<ffffffff813453ae>] blk_unregister_queue+0x5e/0x90
> > [   40.089036]  [<ffffffff8134d417>] del_gendisk+0x107/0x250
> > [   40.089036]  [<ffffffff814f66b8>] loop_remove+0x18/0x40
> 
> Then the crash is triggered in device release path, which should have
> been avoided in device add path.
> 
> If we want to fix the problem completely, add_disk() must handle failure
> path correctly and return error code on failures, which may involve big
> work, since add_disk() are called by 50+ drivers.

Ok, but the root problem here is add_disk() is being called to create a
disk that was already created, right?  Surely the caller should have
detected this before it called to the block core?

Who is calling add_disk() here?  Is this a fuse device?  If so, then any
user can trigger this, right?

That should be the "easier" fix at the moment to resolve this issue.

greg k-h

  parent reply	other threads:[~2013-03-10 16:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 19:35 kernel BUG at fs/sysfs/group.c:65! Tommi Rantala
2013-03-08 20:41 ` Greg KH
2013-03-08 21:15   ` Tommi Rantala
2013-03-09 13:48   ` Ming Lei
2013-03-09 16:36     ` Tommi Rantala
2013-03-10  8:53       ` Ming Lei
2013-03-10 11:50         ` Tejun Heo
2013-03-10 16:41         ` Greg KH [this message]
2013-03-10 20:35           ` Eric W. Biederman
2013-03-10 21:40             ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2014-10-09 12:43 Weng Meiling
2014-10-09 12:47 ` Weng Meiling
2014-10-11  3:00   ` Weng Meiling
2009-07-02 13:31 Ken-ichirou MATSUZAWA

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=20130310164102.GD4392@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=davej@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=tom.leiming@gmail.com \
    --cc=tt.rantala@gmail.com \
    --cc=yan@linux.vnet.ibm.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.