Patch "dm log writes: fix check of kthread_run() return value" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
dm log writes: fix check of kthread_run() return value
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
dm-log-writes-fix-check-of-kthread_run-return-value.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
91e630d9ae6de6f740ef7c8176736eb55366833eMon Sep 17 00:00:00 2001
From: Vladimir Zapolskiy <[email protected]>
Date: Thu, 10 Mar 2016 01:22:19 +0200
Subject: dm log writes: fix check of kthread_run() return value
From: Vladimir Zapolskiy <[email protected]>
commit 91e630d9ae6de6f740ef7c8176736eb55366833e upstream.
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.
--- drivers/md/dm-log-writes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/md/dm-log-writes.c +2 -2
@@ -456,9 +456,9 @@ static int log_writes_ctr(struct dm_targ goto bad; } - ret = -EINVAL ; lc->log_kthread =kthread_run (log_writes_kthread, lc,"log-write" ); -if (!lc->log_kthread) { +if (IS_ERR (lc->log_kthread)) { + ret =PTR_ERR (lc->log_kthread); ti->error ="Couldn't alloc kthread" ;dm_put_device (ti, lc->dev);dm_put_device (ti, lc->logdev);
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/dm-log-writes-fix-check-of-kthread_run-return-value.patch