public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Benoit Boissinot <bboissin@gmail.com>,
	Mattia Dongili <malattia@linux.it>,
	USB development list <linux-usb-devel@lists.sourceforge.net>,
	Kernel development list <linux-kernel@vger.kernel.org>,
	SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: [linux-usb-devel] 2.6.19-rc5-mm1
Date: Thu, 9 Nov 2006 14:51:00 -0800	[thread overview]
Message-ID: <20061109145100.01d6ec46.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0611091655080.2262-100000@iolanthe.rowland.org>

On Thu, 9 Nov 2006 16:58:31 -0500 (EST)
Alan Stern <stern@rowland.harvard.edu> wrote:

> On Thu, 9 Nov 2006, Mattia Dongili wrote:
> 
> > On Thu, Nov 09, 2006 at 11:04:53AM -0800, Andrew Morton wrote:
> > > 
> > > (added linux-scsi)
> > [...]
> > > > [27526.232000] EIP: [<e8074e26>]
> > > > scsi_device_dev_release_usercontext+0x36/0x100 [scsi_mod] SS:ESP
> > > > 0068:dfdb1e3c
> > > > 
> > > > full dmesg attached, I can test patches and provide any useful
> > > > information if needed (just not now because the dock is at work).
> > > 
> > > You're the second or third person to report this (to no effect, btw). 
> > 
> > oh, great. I was going to report the same (had with usb key unplug).
> > Linux version 2.6.19-rc5-mm1-1 (mattia@tadamune) (gcc version 4.1.2 20060901 (prerelease) (Debian 4.1.1-13)) #4 SMP Wed Nov 8 22:46:11 CET 2006
> 
> I don't know exactly where the problem lies, but I have narrowed it down.
> 
> In drivers/scsi/sd.c:sd_probe(), the call to add_disk() increases the 
> device's refcount by 1.  However in sd_remove(), the call to del_gendisk() 
> decreases the device's refcount by 2.  Consequently the structure is 
> deallocated too early, causing the oops.
> 
> Somebody who knows more than I do about add_disk() and del_gendisk() will 
> have to figure what's going wrong.
> 

hm.  Maybe it's the disk_sysfs_symlinks() changes.

Could someone who can reproduce this please try this revert, on
2.6.19-rc2-mm2 through 2.6.19-rc5-mm1?



 fs/partitions/check.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -puN fs/partitions/check.c~revert-fix-ide-cs-hang-after-device-removal fs/partitions/check.c
--- a/fs/partitions/check.c~revert-fix-ide-cs-hang-after-device-removal
+++ a/fs/partitions/check.c
@@ -416,7 +416,7 @@ static char *make_block_name(struct gend
 
 static int disk_sysfs_symlinks(struct gendisk *disk)
 {
-	struct device *target = disk->driverfs_dev;
+	struct device *target = get_device(disk->driverfs_dev);
 	int err;
 	char *disk_name = NULL;
 
@@ -452,8 +452,9 @@ err_out_dev_link:
 		sysfs_remove_link(&disk->kobj, "device");
 err_out_disk_name:
 		kfree(disk_name);
-	}
 err_out:
+		put_device(target);
+	}
 	return err;
 }
 
_


  reply	other threads:[~2006-11-09 22:51 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-08  9:54 2.6.19-rc5-mm1 Andrew Morton
2006-11-08 11:11 ` 2.6.19-rc5-mm1 Reuben Farrelly
2006-11-08 20:05   ` 2.6.19-rc5-mm1 Andrew Morton
2006-11-08 20:15     ` 2.6.19-rc5-mm1 Dave Jones
2006-11-08 20:31       ` 2.6.19-rc5-mm1 Andrew Morton
2006-11-08 21:18         ` 2.6.19-rc5-mm1 Dave Jones
2006-11-09  3:09       ` [PATCH] cpufreq: select consistently (Re: 2.6.19-rc5-mm1) Randy Dunlap
2006-11-09  3:39         ` Dave Jones
2006-11-08 12:07 ` 2.6.19-rc5-mm1 Mariusz Kozlowski
2006-11-08 12:32   ` 2.6.19-rc5-mm1 Hesse, Christian
2006-11-08 12:54     ` 2.6.19-rc5-mm1 Mariusz Kozlowski
2006-11-08 14:57       ` 2.6.19-rc5-mm1 Mariusz Kozlowski
2006-11-08 18:13         ` 2.6.19-rc5-mm1 Andrew Morton
2006-11-08 19:19         ` 2.6.19-rc5-mm1 Andrew Morton
2006-11-08 20:47           ` 2.6.19-rc5-mm1 Mariusz Kozlowski
2006-11-08 15:08 ` 2.6.19-rc5-mm1 Benoit Boissinot
2006-11-08 22:10   ` 2.6.19-rc5-mm1 Thomas Gleixner
2006-11-08 23:31 ` 2.6.19-rc5-mm1 Rafael J. Wysocki
2006-11-09  0:17   ` 2.6.19-rc5-mm1 Andrew Morton
2006-11-09  0:44     ` 2.6.19-rc5-mm1 Rafael J. Wysocki
2006-11-09  0:55       ` 2.6.19-rc5-mm1 Andrew Morton
2006-11-09  1:04         ` 2.6.19-rc5-mm1 Rafael J. Wysocki
2006-11-09 15:42           ` 2.6.19-rc5-mm1: HPC nx6325 breakage, VESA fb problem, md-raid problem Rafael J. Wysocki
2006-11-09 17:58             ` Andrew Morton
2006-11-10  4:49               ` Andi Kleen
2006-11-10  5:15                 ` Andrew Morton
2006-11-10  6:19                   ` Andi Kleen
2006-11-10 11:21                     ` Rafael J. Wysocki
2006-11-10 11:51                       ` Andi Kleen
2006-11-10 10:44               ` Franck Bui-Huu
2006-11-10  6:28             ` Neil Brown
2006-11-10 23:20               ` Rafael J. Wysocki
2006-11-10 23:29                 ` Neil Brown
2006-11-09 15:04 ` 2.6.19-rc5-mm1 -- ppc64 ohci-hdc.c compile failure Andy Whitcroft
2006-11-09 22:43   ` Benjamin Herrenschmidt
2006-11-10  9:49     ` Paul Mackerras
2006-11-10  9:58       ` Benjamin Herrenschmidt
2006-11-09 18:43 ` 2.6.19-rc5-mm1 Benoit Boissinot
2006-11-09 19:04   ` 2.6.19-rc5-mm1 Andrew Morton
2006-11-09 19:26     ` 2.6.19-rc5-mm1 Mattia Dongili
2006-11-09 21:58       ` [linux-usb-devel] 2.6.19-rc5-mm1 Alan Stern
2006-11-09 22:51         ` Andrew Morton [this message]
2006-11-09 23:39           ` Cédric Augonnet
2006-11-10  0:11             ` Andrew Morton
2006-11-10 20:17               ` Anton Vorontsov
2006-11-10 19:29           ` Benoit Boissinot
2006-11-10  3:21 ` 2.6.19-rc5-mm1 Ed Tomlinson
2006-11-10  3:31   ` 2.6.19-rc5-mm1 Andrew Morton
2006-11-10 12:28     ` 2.6.19-rc5-mm1 Ed Tomlinson
2006-11-10 16:29 ` 2.6.19-rc5-mm1 Benoit Boissinot
2006-11-10 16:59   ` 2.6.19-rc5-mm1 Thomas Gleixner
2006-11-10 17:25     ` 2.6.19-rc5-mm1 Benoit Boissinot
2006-11-10 20:20       ` 2.6.19-rc5-mm1 Benoit Boissinot
2006-11-10 20:41         ` 2.6.19-rc5-mm1 Thomas Gleixner
2006-11-13 15:58 ` 2.6.19-rc5-mm1 Mariusz Kozlowski
2006-11-13 22:19   ` 2.6.19-rc5-mm1 Andrew Morton
2006-11-13 22:26     ` 2.6.19-rc5-mm1 Mariusz Kozlowski
2006-11-13 23:37       ` 2.6.19-rc5-mm1 Andrew Morton
2006-11-13 21:03 ` [-mm patch] arch/i386/kernel/apic.c: make a function static Adrian Bunk
2006-11-14  6:54   ` Ingo Molnar
2006-11-13 21:03 ` [-mm patch] make arch/i386/kernel/io_apic.c:timer_irq_works() static again Adrian Bunk
2006-11-13 21:52   ` Zachary Amsden
2006-11-14  6:53   ` Ingo Molnar
2006-11-13 21:03 ` [-mm patch] i386: unexport read_persistent_clock Adrian Bunk
2006-11-13 21:04 ` [-mm patch] make arch/i386/kernel/cpu/common.c:alloc_gdt() static Adrian Bunk

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=20061109145100.01d6ec46.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=bboissin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=malattia@linux.it \
    --cc=stern@rowland.harvard.edu \
    /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