All of lore.kernel.org
 help / color / mirror / Atom feed
* Linux 3.0 oopses when pulling a USB CDROM
@ 2011-07-01 17:05 Andi Kleen
  2011-07-01 18:14 ` Dave Jones
  2011-07-01 19:20 ` James Bottomley
  0 siblings, 2 replies; 63+ messages in thread
From: Andi Kleen @ 2011-07-01 17:05 UTC (permalink / raw)
  To: linux-scsi, linux-kernel; +Cc: axboe, rjw

Hi,

I found I can reliably crash a 3.0 system by pulling the
USB cable of a mounted USB cdrom (or rather a USB device which
has a builtin fake CD-ROM) 

I suspect it's a regression too.

It ends with a NULL pointer reference on a NULL sdev in 
scsi_prep_state_check. 

Here's a somewhat incomplete backtrace (written down by hand)

scsi_prep_state_check
scsi_setup_blk_pc_cmnd
blk_peek_request
...
scsi_request_fn
...
ioctl_internal_command
...
scsi_set_medium_removal
sr_lock_door
cdrom_release
...
umount

I tried adding a 

	if (!sdev) 
		return BLKPREP_KILL;

to scsi_prep_state_check, but that caused a RCU CPU stall 
and a generally unhappy system instead.

The sdev must be still there in scsi_set_medium_removal because it's 
referenced, so it must get lost somewhere in SCSI or in the block layer.

Any ideas how to fix this?

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only

^ permalink raw reply	[flat|nested] 63+ messages in thread

end of thread, other threads:[~2011-10-21 13:26 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-01 17:05 Linux 3.0 oopses when pulling a USB CDROM Andi Kleen
2011-07-01 18:14 ` Dave Jones
2011-07-01 18:32   ` Andi Kleen
2011-07-01 18:40     ` Dave Jones
2011-07-02 15:13     ` Christoph Fritz
2011-07-01 20:29   ` James Bottomley
2011-07-01 20:43     ` [PATCH] USB: fix regression occurring during device removal Alan Stern
2011-07-01 20:43       ` Alan Stern
2011-07-01 21:04       ` Andi Kleen
2011-07-01 21:04     ` Linux 3.0 oopses when pulling a USB CDROM Alan Stern
2011-07-01 21:04       ` Alan Stern
2011-07-01 21:13       ` James Bottomley
2011-07-02  2:03         ` Alan Stern
2011-07-02  2:03           ` Alan Stern
2011-07-02  6:08           ` Andi Kleen
2011-07-02 12:24             ` James Bottomley
2011-07-02 17:05               ` Andi Kleen
2011-07-02 17:09                 ` James Bottomley
2011-07-02 17:09                   ` James Bottomley
2011-07-02 18:15                   ` Andi Kleen
2011-07-02 18:15                     ` Andi Kleen
2011-07-02 20:05                     ` Alan Stern
2011-07-02 20:05                       ` Alan Stern
2011-07-03  1:16                       ` Andi Kleen
2011-07-03  1:16                         ` Andi Kleen
2011-07-03 15:29                         ` Alan Stern
2011-07-03 15:29                           ` Alan Stern
2011-07-03 16:06                           ` Alan Stern
2011-07-03 16:06                             ` Alan Stern
2011-07-02 17:37               ` Alan Stern
2011-07-02 17:37                 ` Alan Stern
2011-07-02 18:11                 ` Andi Kleen
2011-07-02 19:59                   ` Alan Stern
2011-07-03  1:17                     ` Andi Kleen
2011-07-07 20:47                     ` solved was " Andi Kleen
2011-07-18 16:59                     ` Dan Williams
2011-07-18 18:00                       ` Andi Kleen
2011-07-20  9:58                       ` Jack Wang
2011-07-20  9:58                         ` Jack Wang
2011-10-18 21:16                         ` Ankit Jain
2011-10-18 21:30                           ` James Bottomley
2011-10-21 13:26                             ` Hannes Reinecke
2011-07-03  9:14                 ` Dan Williams
2011-07-03 18:16                   ` Andi Kleen
2011-07-03 20:37                 ` Stefan Richter
2011-07-08 13:37                   ` Stefan Richter
2011-07-08 13:41                     ` Stefan Richter
2011-07-08 13:41                       ` Stefan Richter
2011-07-04 11:27                 ` Heiko Carstens
2011-07-04 11:27                   ` Heiko Carstens
2011-07-04 16:04                   ` Alan Stern
2011-07-06  6:50                     ` Heiko Carstens
2011-07-12 18:49                     ` Jonathan McDowell
2011-07-02 12:38             ` Alan Stern
2011-07-02 12:38               ` Alan Stern
2011-07-02 18:10               ` Andi Kleen
2011-07-02 18:10                 ` Andi Kleen
2011-07-02 12:48             ` Rafael J. Wysocki
2011-07-02 12:48               ` Rafael J. Wysocki
2011-07-02 17:06               ` Andi Kleen
2011-07-01 19:20 ` James Bottomley
2011-07-01 19:33   ` James Bottomley
2011-07-01 19:45     ` James Bottomley

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.