]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: unisys: visorhba: fail gracefully for thread creation failures
authorTim Sell <Timothy.Sell@unisys.com>
Fri, 6 May 2016 17:11:20 +0000 (13:11 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 May 2016 12:15:18 +0000 (14:15 +0200)
commit0fab0f4fcbc08763158529b5ff124c596aef6bf9
treea008d677d5c19e905875866383af66ca291fc903
parent77c9a4ae81940fb97a8ec720b64b94a999698963
staging: unisys: visorhba: fail gracefully for thread creation failures

Previously, if visorhba ever failed to create its thread, it would have
subsequently attempted to do a kthread_stop() on an invalid task_struct
pointer.  This was fixed via the new visor_thread_stop() function, which
validates the task_struct pointer before doing the kthread_stop().

Also, the other thread-related fields in visor_thread_info (has_stopped
and id) were not being used, so visor_thead_info was just removed.

We also now spit out an error message if thread creation fails.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorhba/visorhba_main.c