linux/drivers
Yufen Yu d11de63f2b nvme-loop: init nvmet_ctrl fatal_err_work when allocate
After commit 4d43d395fe (workqueue: Try to catch flush_work() without
INIT_WORK()), it can cause warning when delete nvme-loop device, trace
like:

[   76.601272] Call Trace:
[   76.601646]  ? del_timer+0x72/0xa0
[   76.602156]  __cancel_work_timer+0x1ae/0x270
[   76.602791]  cancel_work_sync+0x14/0x20
[   76.603407]  nvmet_ctrl_free+0x1b7/0x2f0 [nvmet]
[   76.604091]  ? free_percpu+0x168/0x300
[   76.604652]  nvmet_sq_destroy+0x106/0x240 [nvmet]
[   76.605346]  nvme_loop_destroy_admin_queue+0x30/0x60 [nvme_loop]
[   76.606220]  nvme_loop_shutdown_ctrl+0xc3/0xf0 [nvme_loop]
[   76.607026]  nvme_loop_delete_ctrl_host+0x19/0x30 [nvme_loop]
[   76.607871]  nvme_do_delete_ctrl+0x75/0xb0
[   76.608477]  nvme_sysfs_delete+0x7d/0xc0
[   76.609057]  dev_attr_store+0x24/0x40
[   76.609603]  sysfs_kf_write+0x4c/0x60
[   76.610144]  kernfs_fop_write+0x19a/0x260
[   76.610742]  __vfs_write+0x1c/0x60
[   76.611246]  vfs_write+0xfa/0x280
[   76.611739]  ksys_write+0x6e/0x120
[   76.612238]  __x64_sys_write+0x1e/0x30
[   76.612787]  do_syscall_64+0xbf/0x3a0
[   76.613329]  entry_SYSCALL_64_after_hwframe+0x44/0xa9

We fix it by moving fatal_err_work init to nvmet_alloc_ctrl(), which may
more reasonable.

Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-03-13 12:05:39 -06:00
..
accessibility
acpi ACPI: Set debug output flags independent of ACPICA 2019-02-07 12:24:28 +01:00
amba
android
ata Linux 5.0-rc6 2019-02-15 08:43:59 -07:00
atm
auxdisplay
base Driver core fixes for 5.0-rc6 2019-02-08 10:53:44 -08:00
bcma
block Merge branch 'stable/for-jens-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-5.1/block-post 2019-03-06 09:41:54 -07:00
bluetooth
bus
cdrom cdrom: Fix race condition in cdrom_sysctl_register 2019-02-08 06:46:59 -07:00
char
clk
clocksource
connector
cpufreq
cpuidle
crypto
dax
dca
devfreq
dio
dma dmaengine-fix-5.0-rc6 2019-02-10 10:39:37 -08:00
dma-buf
edac
eisa
extcon
firewire
firmware ARM: SoC fixes for linux-5.0 2019-02-08 16:23:41 -08:00
fmc
fpga
fsi
gnss
gpio
gpu drm-misc-fixes for v5.0-rc6: 2019-02-08 10:32:49 +10:00
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c
i3c
ide
idle
iio
infiniband
input
iommu IOMMU Fix for Linux v5.0-rc5: 2019-02-08 15:34:10 -08:00
ipack
irqchip Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-02-10 09:54:19 -08:00
isdn mISDN: fix a race in dev_expire_timer() 2019-02-05 16:39:29 -08:00
leds
lightnvm pblk: fix max_io calculation 2019-03-07 08:59:26 -07:00
macintosh
mailbox
mcb
md md: Fix failed allocation of md_register_thread 2019-03-12 10:15:18 -07:00
media
memory
memstick
message
mfd
misc
mmc Linux 5.0-rc6 2019-02-15 08:43:59 -07:00
mtd mtd: rawnand: gpmi: fix MX28 bus master lockup problem 2019-02-06 09:39:22 +01:00
mux
net net: dsa: b53: Fix for failure when irq is not defined in dt 2019-02-07 18:18:37 -08:00
nfc
ntb
nubus
nvdimm
nvme nvme-loop: init nvmet_ctrl fatal_err_work when allocate 2019-03-13 12:05:39 -06:00
nvmem
of
opp
oprofile
parisc
parport
pci pci-v5.0-fixes-4 2019-02-08 15:32:10 -08:00
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-08 11:21:54 -08:00
sbus
scsi Linux 5.0-rc6 2019-02-15 08:43:59 -07:00
sfi
sh
siox
slimbus
sn
soc
soundwire
spi
spmi
ssb
staging Linux 5.0-rc6 2019-02-15 08:43:59 -07:00
target
tc
tee
thermal
thunderbolt
tty TTY/Serial fixes for 5.0-rc6 2019-02-08 10:49:55 -08:00
uio
usb
uwb
vfio
vhost
video
virt
virtio virtio: drop internal struct from UAPI 2019-02-05 15:29:48 -05:00
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile