summaryrefslogtreecommitdiff
path: root/drivers/md/dm-rq.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2016-07-06 09:06:37 -0400
committerMike Snitzer <snitzer@redhat.com>2016-07-06 09:06:37 -0400
commit7193a9defcab6f3d3f1eb64c68bad7534e5a39ad (patch)
treeb11124a507678ec506395d879377e2da3c481a30 /drivers/md/dm-rq.c
parent602d1657c603eedd7379a8bcde1ad3a2972ecc5f (diff)
dm rq: check kthread_run return for .request_fn request-based DM
Check return value of kthread_run() in dm_old_init_request_queue(). Reported-by: Minfei Huang <mnghuan@gmail.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-rq.c')
-rw-r--r--drivers/md/dm-rq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c
index 266f7b674108..aa81539374a6 100644
--- a/drivers/md/dm-rq.c
+++ b/drivers/md/dm-rq.c
@@ -819,6 +819,8 @@ int dm_old_init_request_queue(struct mapped_device *md)
init_kthread_worker(&md->kworker);
md->kworker_task = kthread_run(kthread_worker_fn, &md->kworker,
"kdmwork-%s", dm_device_name(md));
+ if (IS_ERR(md->kworker_task))
+ return PTR_ERR(md->kworker_task);
elv_register_queue(md->queue);