linux-hardened/drivers/block
Jens Axboe fe54303ee2 NVMe: fix retry/error logic in nvme_queue_rq()
The logic around retrying and erroring IO in nvme_queue_rq() is broken
in a few ways:

- If we fail allocating dma memory for a discard, we return retry. We
  have the 'iod' stored in ->special, but we free the 'iod'.

- For a normal request, if we fail dma mapping of setting up prps, we
  have the same iod situation. Additionally, we haven't set the callback
  for the request yet, so we also potentially leak IOMMU resources.

Get rid of the ->special 'iod' store. The retry is uncommon enough that
it's not worth optimizing for or holding on to resources to attempt to
speed it up. Additionally, it's usually best practice to free any
request related resources when doing retries.

Acked-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-12-11 13:58:39 -07:00
..
aoe
drbd drbd: use generic io stats accounting functions to simplify io stat accounting 2014-11-24 08:05:14 -07:00
mtip32xx
paride
rsxx block/rsxx: use generic io stats accounting functions to simplify io stat accounting 2014-11-24 08:05:18 -07:00
xen-blkback
zram zram: avoid kunmap_atomic() of a NULL pointer 2014-11-13 16:17:05 -08:00
amiflop.c
ataflop.c
brd.c
cciss.c
cciss.h
cciss_cmd.h
cciss_scsi.c
cciss_scsi.h
cpqarray.c
cpqarray.h
cryptoloop.c
DAC960.c
DAC960.h
floppy.c
hd.c
ida_cmd.h
ida_ioctl.h
Kconfig
loop.c
loop.h
Makefile
mg_disk.c
nbd.c
null_blk.c null_blk: boundary check queue_mode and irqmode 2014-11-26 14:45:48 -07:00
nvme-core.c NVMe: fix retry/error logic in nvme_queue_rq() 2014-12-11 13:58:39 -07:00
nvme-scsi.c NVMe: Convert to blk-mq 2014-11-04 13:18:52 -07:00
osdblk.c
pktcdvd.c
ps3disk.c
ps3vram.c
rbd.c
rbd_types.h
skd_main.c
skd_s1120.h
smart1,2.h
sunvdc.c sunvdc: don't call VD_OP_GET_VTOC 2014-10-31 15:49:45 -04:00
swim.c
swim3.c
swim_asm.S
sx8.c
umem.c
umem.h
virtio_blk.c
xen-blkfront.c xen/blkfront: remove redundant flush_op 2014-12-10 12:20:18 -05:00
xsysace.c
z2ram.c