]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: pblk: ensure kthread alloc. before kicking it
authorJavier González <javier@cnexlabs.com>
Fri, 5 Jan 2018 13:16:17 +0000 (14:16 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 5 Jan 2018 15:50:12 +0000 (08:50 -0700)
commita9f5b8e312187df3908809c43570da2e03e09fca
treea705d8c9a929b4e38444c3145ae67494800a30ad
parent11cacb43e6fa6394c5862e21284ac420eee4ef7c
lightnvm: pblk: ensure kthread alloc. before kicking it

When creating the write thread, ensure that the kthread has been created
before initializing the timer responsible from kicking it. Otherwise, if
the kthread creation fails or gets killed from used space, we risk
kicking an empty thread structure.

Also, since the kthread creation can be interrupted form user space,
adapt the error path to not report an error when this happens, since it
is intentional that the instance creation is aborted.

Signed-off-by: Javier González <javier@cnexlabs.com>
Updated source to reflect the new timer_setup API.
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-init.c