linux/drivers/block
Bjorn Helgaas b6550777a3 [PATCH] cciss: unregister from SCSI before tearing down device resources
We must unregister from SCSI before we unmap device resources and unhook
the IRQ handler.  Otherwise, SCSI may send us more requests, and we won't
be able to handle them.

I see the following oops during every reboot of my HP DL360:

    ...
    Unmounting local filesystems...done.
    Rebooting... Completed flushing cache on controller 0
    BUG: unable to handle kernel paging request at virtual address f8808040
     printing eip:
    c02dc72b
    *pde = 02120067
    *pte = 00000000
    Oops: 0002 [#1]
    SMP
    Modules linked in:
    CPU:    1
    EIP:    0060:[<c02dc72b>]    Not tainted VLI
    EFLAGS: 00010046   (2.6.21-rc6 #1)
    EIP is at SA5_submit_command+0xb/0x20
    eax: f8808000   ebx: f7a00000   ecx: f79f0000   edx: 37a00000
    esi: f79f0000   edi: 00000000   ebp: 00000000   esp: dd717a44
    ds: 007b   es: 007b   fs: 00d8  gs: 0000  ss: 0068
    Process khelper (pid: 1427, ti=dd716000 task=c2260a70 task.ti=dd716000)
    Stack: c02df2c0 f7a00000 f7a00000 00d41008 c02df691 00000000 00000010 00000002
	   00000001 f79f0000 f7fff844 c1398420 00000000 00000000 00001000 230a3020
	   69666564 5420656e 50434f49 465f544b 4853554c 44414552 0a312009 66656423
    Call Trace:
     [<c02df2c0>] start_io+0x80/0x120
     [<c02df691>] do_cciss_request+0x331/0x350
     [<c014242a>] mempool_alloc+0x2a/0xe0
     [<c020ad71>] blk_alloc_request+0x61/0x80
     [<c020b02e>] get_request+0x15e/0x1e0
     [<c01595e0>] cache_alloc_refill+0xb0/0x1e0
     [<c021049d>] as_update_rq+0x2d/0x80
     [<c0210d28>] as_add_request+0x68/0x90
     [<c0207f99>] elv_insert+0x119/0x160
     [<c020bd0b>] __make_request+0xcb/0x320
     [<c0122ee0>] lock_timer_base+0x20/0x50
     [<c0123096>] del_timer+0x56/0x60
     [<c020a7b8>] blk_remove_plug+0x38/0x70
     [<c020a815>] __generic_unplug_device+0x25/0x30
     [<c020a835>] generic_unplug_device+0x15/0x30
    ...

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-12 15:31:42 -07:00
..
aoe [AOE]: Add get_unaligned() calls where needed. 2007-03-02 15:22:55 -08:00
paride [PATCH] paride endianness annotations 2007-03-14 15:27:50 -07:00
acsi_slm.c [PATCH] mark struct file_operations const 3 2007-02-12 09:48:45 -08:00
acsi.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
amiflop.c [PATCH] amiga_floppy_init() in non-modular case 2006-10-11 11:17:07 -07:00
ataflop.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
cciss_cmd.h [PATCH] cciss: add support for 1024 logical volumes 2006-12-07 08:39:30 -08:00
cciss_scsi.c [PATCH] completions: lockdep annotate on stack completions 2006-10-01 00:39:24 -07:00
cciss_scsi.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cciss.c [PATCH] cciss: unregister from SCSI before tearing down device resources 2007-04-12 15:31:42 -07:00
cciss.h [PATCH] cciss: add support for 1024 logical volumes 2006-12-07 08:39:30 -08:00
cpqarray.c [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
cpqarray.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cryptoloop.c [BLOCK] cryptoloop: Use block ciphers where applicable 2006-09-21 11:45:53 +10:00
DAC960.c [PATCH] mark struct file_operations const 3 2007-02-12 09:48:45 -08:00
DAC960.h [PATCH] drivers/block/DAC960: convert 'boolean' to 'bool' 2007-02-11 11:18:06 -08:00
floppy.c [PATCH] Fix build errors if bitop functions are do {} while macros 2007-02-20 17:10:12 -08:00
ida_cmd.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ida_ioctl.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Kconfig [PATCH] initramfs should not depend on CONFIG_BLOCK 2007-03-06 09:30:25 -08:00
loop.c [PATCH] struct path: convert block_drivers 2006-12-08 08:28:44 -08:00
Makefile [PATCH] remove the broken BLK_DEV_SWIM_IOP driver 2006-12-13 09:05:53 -08:00
nbd.c [PATCH] struct path: convert nbd 2006-12-08 08:28:47 -08:00
pktcdvd.c [PATCH] pktcdvd: Correctly set cmd_len field in pkt_generic_packet 2007-02-20 17:10:14 -08:00
ps2esdi.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
rd.c [PATCH] rd: memory leak on rd_init() failure 2006-10-17 08:18:48 -07:00
smart1,2.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
swim3.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
sx8.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
ub.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
umem.c [PATCH] Fix failure paths in modules init in umem.c 2007-03-01 14:53:36 -08:00
viodasd.c [POWERPC] iSeries: fix viodasd init 2006-12-20 16:37:47 +11:00
xd.c [PATCH] Use linux/io.h instead of asm/io.h 2006-10-11 11:14:23 -07:00
xd.h IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
z2ram.c [PATCH] z2_init() in non-modular case 2006-10-11 11:17:07 -07:00