]> www.infradead.org Git - users/jedix/linux-maple.git/commit
uwb: properly check kthread_run return value
authorAndrey Konovalov <andreyknvl@google.com>
Thu, 14 Sep 2017 12:30:55 +0000 (14:30 +0200)
committerTim Tianyang Chen <tianyang.chen@oracle.com>
Fri, 8 Dec 2017 17:34:55 +0000 (09:34 -0800)
commit6feeb969cae7020cc789a7c8c74ac9e1a7cdd5bf
tree123d37f321a210816fbadac10c0dd5db5a000adf
parent3c1701c2ab4c149ec33f776ed503cc4ca0ced233
uwb: properly check kthread_run return value

uwbd_start() calls kthread_run() and checks that the return value is
not NULL. But the return value is not NULL in case kthread_run() fails,
it takes the form of ERR_PTR(-EINTR).

Use IS_ERR() instead.

Also add a check to uwbd_stop().

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit bbf26183b7a6236ba602f4d6a2f7cade35bba043)

Orabug: 27206874
CVE: CVE-2017-16526

Signed-off-by: Tim Tianyang Chen <tianyang.chen@oracle.com>
Reviewed-by: Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/uwb/uwbd.c