kernel-hacking-2024-linux-s.../drivers/block
Herton Ronaldo Krzesinski b54e1f8889 floppy: don't call alloc_ordered_workqueue inside the alloc_disk loop
Since commit 070ad7e ("floppy: convert to delayed work and single-thread
wq"), we end up calling alloc_ordered_workqueue multiple times inside
the loop, which shouldn't be intended. Besides the leak, other side
effect in the current code is if blk_init_queue fails, we would end up
calling unregister_blkdev even if we didn't call yet register_blkdev.

Just moved the allocation of floppy_wq before the loop, and adjusted the
code accordingly.

Cc: stable@vger.kernel.org # 3.5+
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-10-30 08:34:24 +01:00
..
aoe aoe: update aoe-internal version number to 50 2012-10-06 03:05:30 +09:00
drbd block: Generalized bio pool freeing 2012-09-09 10:35:38 +02:00
mtip32xx mtip32xx: fix user_buffer check in exec_drive_command 2012-09-12 22:21:13 +02:00
paride
xen-blkback xen/blkback: Fix compile warning 2012-10-30 08:32:43 +01:00
amiflop.c
ataflop.c
brd.c
cciss.c
cciss.h
cciss_cmd.h
cciss_scsi.c cciss: fix handling of protocol error 2012-09-18 11:57:08 +02:00
cciss_scsi.h
cpqarray.c
cpqarray.h
cryptoloop.c
DAC960.c
DAC960.h
floppy.c floppy: don't call alloc_ordered_workqueue inside the alloc_disk loop 2012-10-30 08:34:24 +01:00
hd.c
ida_cmd.h
ida_ioctl.h
Kconfig drivers/block: remove CONFIG_EXPERIMENTAL 2012-10-23 22:30:38 +02:00
loop.c userns: Convert loop to use kuid_t instead of uid_t 2012-09-21 03:13:20 -07:00
Makefile block: remove the deprecated ub driver 2012-09-05 17:18:53 -07:00
mg_disk.c mg_disk: Use struct dev_pm_ops for power management 2012-07-06 19:07:00 +02:00
nbd.c nbd: handle discard requests 2012-10-06 03:05:24 +09:00
nvme.c PCI changes for the 3.7 merge window: 2012-10-01 12:05:36 -07:00
osdblk.c block: Add bio_clone_bioset(), bio_clone_kmalloc() 2012-09-09 10:35:39 +02:00
pktcdvd.c pktcdvd: Switch to bio_kmalloc() 2012-09-09 10:35:39 +02:00
ps3disk.c
ps3vram.c
rbd.c rbd: BUG on invalid layout 2012-10-01 17:20:00 -05:00
rbd_types.h rbd: define some new format constants 2012-10-01 14:30:53 -05:00
smart1,2.h
sunvdc.c
swim.c
swim3.c
swim_asm.S
sx8.c
umem.c blk: pass from_schedule to non-request unplug functions. 2012-07-31 09:08:15 +02:00
umem.h
virtio_blk.c virtio-blk: Disable callback in virtblk_done() 2012-09-28 15:05:16 +09:30
xd.c
xd.h
xen-blkfront.c workqueue: deprecate flush[_delayed]_work_sync() 2012-08-20 14:51:24 -07:00
xsysace.c
z2ram.c