mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Ming Lei <tom.leiming@gmail.com>,
	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>,
	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 14:40:09 -0700	[thread overview]
Message-ID: <20130310214009.GB5445@kroah.com> (raw)
In-Reply-To: <87r4jnouwv.fsf@xmission.com>

On Sun, Mar 10, 2013 at 01:35:12PM -0700, Eric W. Biederman wrote:
> Greg KH <gregkh@linuxfoundation.org> writes:
> 
> > 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.
> 
> At first glance this looks like rances in the loop driver.

Then that should be easy to fix, only allow one loop device to be
created / removed at a time?

greg k-h

  reply	other threads:[~2013-03-10 21:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 19:35 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
2013-03-10 20:35           ` Eric W. Biederman
2013-03-10 21:40             ` Greg KH [this message]
2014-10-09 12:43 Weng Meiling
2014-10-09 12:47 ` Weng Meiling
2014-10-11  3:00   ` Weng Meiling

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=20130310214009.GB5445@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome