linux_dsm_epyc7002/drivers/nvme/target
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
..
admin-cmd.c nvmet: convert to SPDX identifiers 2019-02-20 07:22:42 -07:00
configfs.c nvmet: convert to SPDX identifiers 2019-02-20 07:22:42 -07:00
core.c nvme-loop: init nvmet_ctrl fatal_err_work when allocate 2019-03-13 12:05:39 -06:00
discovery.c nvmet: convert to SPDX identifiers 2019-02-20 07:22:42 -07:00
fabrics-cmd.c nvmet: convert to SPDX identifiers 2019-02-20 07:22:42 -07:00
fc.c nvmet-fc: convert to SPDX identifiers 2019-02-20 07:22:31 -07:00
fcloop.c nvmet-fcloop: convert to SPDX identifiers 2019-02-20 07:22:34 -07:00
io-cmd-bdev.c nvmet: convert to SPDX identifiers 2019-02-20 07:22:42 -07:00
io-cmd-file.c nvmet: add error log support for file backend 2018-12-13 09:59:06 +01:00
Kconfig nvmet-tcp: add NVMe over TCP target driver 2018-12-13 09:58:57 +01:00
loop.c nvme-loop: convert to SPDX identifiers 2019-02-20 07:22:36 -07:00
Makefile nvmet-tcp: add NVMe over TCP target driver 2018-12-13 09:58:57 +01:00
nvmet.h nvmet: convert to SPDX identifiers 2019-02-20 07:22:42 -07:00
rdma.c nvmet-rdma: convert to SPDX identifiers 2019-02-20 07:22:39 -07:00
tcp.c nvmet-tcp: fix uninitialized variable access 2019-01-16 09:44:20 -07:00