Joe Lawrence 2b5bebccd2 [SCSI] st: Take additional queue ref in st_probe
This patch fixes a reference count bug in the SCSI tape driver which can be
reproduced with the following:

* Boot with slub_debug=FZPU, tape drive attached
* echo 1 > /sys/devices/... tape device pci path .../remove
* Wait for device removal
* echo 1 > /sys/kernel/slab/blkdev_queue/validate
* Slub debug complains about corrupted poison pattern

In commit 523e1d39 (block: make gendisk hold a reference to its queue)
add_disk() and disk_release() were modified to get/put an additional
reference on a disk queue to fix a reference counting discrepency
between bdev release and SCSI device removal.  The ST driver never
calls add_disk(), so this commit introduced an extra kref put when the
ST driver frees its struct gendisk.

Attempts were made to fix this bug at the block level [1] but later
abandoned due to floppy driver issues [2].

[1] https://lkml.org/lkml/2012/8/27/354
[2] https://lkml.org/lkml/2012/9/22/113

Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Tested-by: Ewan D. Milne <emilne@redhat.com>
Acked-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-04-06 11:14:20 +01:00
..
2013-04-05 19:29:36 -07:00
2013-03-23 12:33:36 -07:00
2013-02-21 15:27:22 -08:00
2013-02-27 19:10:15 -08:00
2013-02-27 19:10:15 -08:00
2013-04-04 08:40:14 -07:00
2013-04-05 19:29:36 -07:00
2013-03-01 13:39:00 -08:00
2013-03-18 08:17:14 -07:00
2013-03-27 09:25:11 -07:00
2013-03-15 12:58:12 -07:00
2013-03-18 08:27:41 -07:00
2013-02-27 19:10:18 -08:00
2013-02-26 09:34:29 -08:00
2013-02-27 19:10:18 -08:00
2013-03-21 13:35:39 +01:00
2013-04-05 10:04:41 -07:00
2013-03-28 15:53:33 -07:00
2013-02-27 19:10:19 -08:00
2013-03-27 12:56:25 -07:00
2013-02-22 23:31:31 -05:00
2013-02-21 13:57:13 -08:00