aboutsummaryrefslogtreecommitdiff
path: root/lib/libcrc32c.c
diff options
context:
space:
mode:
authorSun Ke2020-01-22 11:18:57 +0800
committerJens Axboe2020-01-29 21:05:53 -0700
commit5c0dd228b5fc30a3b732c7ae2657e0161ec7ed80 (patch)
treef42e9604422c696d51a58481bdb4162a7c58988b /lib/libcrc32c.c
parent6a365874a43c43b227492266f59cd68ecc5a6f83 (diff)
nbd: add a flush_workqueue in nbd_start_device
When kzalloc fail, may cause trying to destroy the workqueue from inside the workqueue. If num_connections is m (2 < m), and NO.1 ~ NO.n (1 < n < m) kzalloc are successful. The NO.(n + 1) failed. Then, nbd_start_device will return ENOMEM to nbd_start_device_ioctl, and nbd_start_device_ioctl will return immediately without running flush_workqueue. However, we still have n recv threads. If nbd_release run first, recv threads may have to drop the last config_refs and try to destroy the workqueue from inside the workqueue. To fix it, add a flush_workqueue in nbd_start_device. Fixes: e9e006f5fcf2 ("nbd: fix max number of supported devs") Signed-off-by: Sun Ke <sunke32@huawei.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/libcrc32c.c')
0 files changed, 0 insertions, 0 deletions