Skip to content
Commit 844cf8a9 authored by Bogdan Mirea's avatar Bogdan Mirea Committed by Felipe Balbi
Browse files

usb: gadget: gserial: check if console kthread exists



Check for bad pointer that may result because of kthread_create failure.
This check is needed since the gserial setup callback function
(gs_console_setup()) is only freeing the info->con_buf in case of
kthread_create failure which will result into bad info->console_thread
pointer.
Without checking info->console_thread pointer validity in the
gserial_console_exit() function, before calling kthread_stop(), the
rmmod will generate Kernel Oops.

Signed-off-by: default avatarBogdan Mirea <Bogdan-Stefan_mirea@mentor.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent d325a1de
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment