All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][2.6.0-test5] fix oopses is kobject parent is removed before child
Date: Tue, 16 Sep 2003 10:46:51 -0700	[thread overview]
Message-ID: <20030916174651.GC3893@kroah.com> (raw)
In-Reply-To: <200309141737.04358.arvidjaar@mail.ru>

On Sun, Sep 14, 2003 at 05:37:04PM +0400, Andrey Borzenkov wrote:
> It is possible that parent is removed before child when child is in use. 
> Trivial example is mounted USB storage when you unplug it. The kobject for 
> USB device is removed but subordinate SCSI device remains. Then kernel oopses 
> on attempt to release child e.g. umount removed USB storage. This patch fixes 
> two problems:
> 
> - kset_hotplug. It oopses in get_kobj_path_length because child->parent points 
> to nowhere - even if parent has not yet been overwritten, its name is already 
> freed. Common oops I get is

No, the scsi code should be fixed to prevent this from happening.  This
used to happen in the past, but I thought the scsi people fixed it up.
The SCSI code should grab a reference on the parent device which will
prevent it from going away until the SCSI device does, preventing all of
these oopes.

thanks,

greg k-h

  reply	other threads:[~2003-09-16 17:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-14 13:37 [PATCH][2.6.0-test5] fix oopses is kobject parent is removed before child Andrey Borzenkov
2003-09-16 17:46 ` Greg KH [this message]
2003-09-19 22:54   ` Mike Anderson

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=20030916174651.GC3893@kroah.com \
    --to=greg@kroah.com \
    --cc=arvidjaar@mail.ru \
    --cc=linux-kernel@vger.kernel.org \
    /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.