All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Maneesh Soni <maneesh@in.ibm.com>
Cc: linux-kernel@vger.kernel.org, cohuck@de.ibm.com
Subject: Re: kernel BUG at fs/sysfs/dir.c:20!
Date: Thu, 4 Nov 2004 14:50:28 -0800	[thread overview]
Message-ID: <20041104225028.GA19575@kroah.com> (raw)
In-Reply-To: <20041104214414.GA2555@in.ibm.com>

On Thu, Nov 04, 2004 at 01:44:14PM -0800, Maneesh Soni wrote:
> On Thu, Nov 04, 2004 at 12:52:38PM -0800, Greg KH wrote:
> > Hi,
> > 
> > I get the following BUG in the sysfs code when I do:
> > 	- plug in a usb-serial device.
> > 	- open the port with 'cat /dev/ttyUSB0'
> > 	- unplug the device.
> > 	- stop the 'cat' process with control-C
> > 
> > This used to work just fine before your big sysfs changes.
> > 
> > Anything I should look at testing?
> > 
> 
> Hi Greg,
> 
> I was about to talk to you. There is a similar problem reported by
> s390 people where we see parent kobject (directory) going away before
> child kobject (sub-directory). It seems kobject code is able to handle
> this, but not the sysfs. What could be happening that in sysfs_remove_dir()
> of parent directory, we try to remove its contents. It works well with
> the regular files as it is the final removal for sysfs_dirent corresponding
> to the files. But in case of sub-directory we are doing an extra sysfs_put().
> Once while removing parent and the other one being the one from when 
> sysfs_remove_dir() is called for the child. 
> 
> The following patch worked for the s390 people, I hope same will work in
> this case also.
> 
> 
> o Do not remove sysfs_dirents corresponding to the sub-directory in 
>   sysfs_remove_dir(). They will be removed in the sysfs_remove_dir() call
>   for the specific sub-directory.

Nice, this fixes the BUG() for me.  I've applied it to my trees.

thanks for the quick response.

greg k-h

      reply	other threads:[~2004-11-04 22:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-04 20:52 kernel BUG at fs/sysfs/dir.c:20! Greg KH
2004-11-04 21:44 ` Maneesh Soni
2004-11-04 22:50   ` Greg KH [this message]

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=20041104225028.GA19575@kroah.com \
    --to=greg@kroah.com \
    --cc=cohuck@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maneesh@in.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.