mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maneesh Soni <maneesh@in.ibm.com>
To: Fabio Coatti <cova@ferrara.linux.it>
Cc: Greg KH <greg@kroah.com>, Pete Zaitcev <zaitcev@redhat.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org,
	linux-usb-devel@lists.sourceforge.net
Subject: Re: 2.6.10-rc2-mm2 usb storage still oopses
Date: Thu, 18 Nov 2004 20:41:10 -0600	[thread overview]
Message-ID: <1100832070.15138.10.camel@chavez.austin.ibm.com> (raw)
In-Reply-To: <200411190042.41199.cova@ferrara.linux.it>

> Nov 18 20:35:24 kefk kernel: Unable to handle kernel NULL pointer dereference 
> at virtual address 00000050
> Nov 18 20:35:24 kefk kernel:  printing eip:
> Nov 18 20:35:24 kefk kernel: c0186e32
> Nov 18 20:35:24 kefk kernel: *pde = 00000000
> Nov 18 20:35:24 kefk kernel: Oops: 0000 [#1]
> Nov 18 20:35:24 kefk kernel: PREEMPT SMP
> Nov 18 20:35:24 kefk kernel: Modules linked in: nls_cp850 usb_storage md5 ipv6 
> rfcomm l2cap bluetooth snd_emu10k1 snd_rawmidi snd_seq_device snd_ac97_codec
> snd_pcm snd_timer snd_page_alloc snd_util_mem snd_hwdep snd soundcore 
> ipt_REJECT iptable_filter ip_tables loop nls_utf8 ide_cd i2c_dev w83781d 
> i2c_sensor i2c_isa i2c_i801 isofs zlib_inflate e1000 parport_pc ppa parport 
> ehci_hcd usblp uhci_hcd genrtc
> Nov 18 20:35:24 kefk kernel: CPU:    0
> Nov 18 20:35:24 kefk kernel: EIP:    0060:[sysfs_hash_and_remove+174/241]    
> Not tainted VLI
> Nov 18 20:35:24 kefk kernel: EIP:    0060:[<c0186e32>]    Not tainted VLI
> Nov 18 20:35:24 kefk kernel: EFLAGS: 00010246   (2.6.10-rc2-mm2)
> Nov 18 20:35:24 kefk kernel: EIP is at sysfs_remove_dir+0x1d/0x10b
> Nov 18 20:35:24 kefk kernel: eax: f6e79988   ebx: f6e79988   ecx: c18ff480   
> edx: c1000000
> Nov 18 20:35:24 kefk kernel: esi: f78b8b00   edi: 00000000   ebp: f7bd5d24   
> esp: c1b7ddd8
> Nov 18 20:35:24 kefk kernel: ds: 007b   es: 007b   ss: 0068

The following patch should avoid the sysfs_remove_dir() oops you are
seeing while device removal. It anyway fixes the obvious error and is
needed. But it will not make any change to the first error you are
seeing while connecting the device.

Andrew, Greg, please include this.

Thanks
Maneesh


o Following patch avoids the sysfs_remove_dir() oops when it is passed
  a kobject with NULL dentry.

Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
---

 linux-2.6.10-rc2-bk3-maneesh/fs/sysfs/dir.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN fs/sysfs/dir.c~fix-sysfs_remove_dir-oops fs/sysfs/dir.c
--- linux-2.6.10-rc2-bk3/fs/sysfs/dir.c~fix-sysfs_remove_dir-oops
2004-11-18 19:59:51.000000000 -0600
+++ linux-2.6.10-rc2-bk3-maneesh/fs/sysfs/dir.c	2004-11-18
20:01:11.000000000 -0600
@@ -268,7 +268,7 @@ void sysfs_remove_subdir(struct dentry *
 void sysfs_remove_dir(struct kobject * kobj)
 {
 	struct dentry * dentry = dget(kobj->dentry);
-	struct sysfs_dirent * parent_sd = dentry->d_fsdata;
+	struct sysfs_dirent * parent_sd;
 	struct sysfs_dirent * sd, * tmp;
 
 	if (!dentry)
@@ -276,6 +276,7 @@ void sysfs_remove_dir(struct kobject * k
 
 	pr_debug("sysfs %s: removing dir\n",dentry->d_name.name);
 	down(&dentry->d_inode->i_sem);
+	parent_sd = dentry->d_fsdata;
 	list_for_each_entry_safe(sd, tmp, &parent_sd->s_children, s_sibling) {
 		if (!sd->s_element || !(sd->s_type & SYSFS_NOT_PINNED))
 			continue;
_




  parent reply	other threads:[~2004-11-19  2:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-18 21:03 Fabio Coatti
2004-11-18 21:35 ` Andrew Morton
2004-11-18 21:58   ` Pete Zaitcev
2004-11-18 23:42     ` Fabio Coatti
2004-11-18 23:55       ` Pete Zaitcev
2004-11-30  0:32         ` Andrew Morton
2004-11-30  3:22           ` James Bottomley
2004-11-30  9:13             ` Fabio Coatti
2004-11-30 19:27             ` Fabio Coatti
2004-11-30 20:58               ` [linux-usb-devel] " Alan Stern
2004-12-01  1:06                 ` Fabio Coatti
2004-11-19  2:41       ` Maneesh Soni [this message]
2004-11-19 16:47         ` Greg KH

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=1100832070.15138.10.camel@chavez.austin.ibm.com \
    --to=maneesh@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=cova@ferrara.linux.it \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=zaitcev@redhat.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

all inboxes | Powered by JetHome®