Re: [patch] block: fix race between request completion and timeout handling

2013-09-10 Thread Jeff Moyer
Ewan Milne writes: > If the request completes after blk_mark_rq_complete() is called but > before blk_clear_req_complete() is called, the completion will not be > processed, and we will have to wait for the request to timeout again. > Maybe this is not so bad, as it should be extremely rare, but

Re: [patch] block: fix race between request completion and timeout handling

2013-09-10 Thread Ewan Milne
On Thu, 2013-08-29 at 15:14 -0400, Jeff Moyer wrote: ... > RIP: 0010:[] [] > blk_requeue_request+0x94/0xa0 ... > Call Trace: > [] __scsi_queue_insert+0xa3/0x150 > [] ? scsi_eh_ready_devs+0x5e3/0x850 > [] scsi_queue_insert+0x13/0x20 > [] scsi_eh_flush_done_q+0x104/0x160 > [] scsi_error_handle

[patch] block: fix race between request completion and timeout handling

2013-08-29 Thread Jeff Moyer
Hi, We have several reports (against a distro kernel) of panics in blk_requeue_request that look like this: kernel BUG at block/blk-core.c:1045! invalid opcode: [#1] SMP last sysfs file: /sys/devices/pci:40/:40:03.0/:55:00.0/infiniband_mad/umad0/port CPU 0 Modules linked in: ipm