dm log writes: fix check of kthread_run() return value
authorVladimir Zapolskiy <vz@mleia.com>
Wed, 9 Mar 2016 23:22:19 +0000 (01:22 +0200)
committerMike Snitzer <snitzer@redhat.com>
Tue, 30 Aug 2016 23:41:43 +0000 (19:41 -0400)
commit91e630d9ae6de6f740ef7c8176736eb55366833e
tree5041057fb7bb3d50805dd0de8c29d0126b337675
parent7efb367320f56fc4d549875b6f3a6940018ef2e5
dm log writes: fix check of kthread_run() return value

The kthread_run() function returns either a valid task_struct or
ERR_PTR() value, check for NULL is invalid.  This change fixes potential
for oops, e.g. in OOM situation.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
drivers/md/dm-log-writes.c