Skip to content
Commit 3a2d3d21 authored by Oleksandr Kozaruk's avatar Oleksandr Kozaruk Committed by Greg Kroah-Hartman
Browse files

drivers: misc: ti-st: fix potential race if st_kim_start fails



If st_kim_start() fails registered protocols should be removed. This is
done by calling st_reg_complete(), which as comment states is called
with spin lock held. But in st_register() when st_kim_start fails it
is called without holding spin lock, creating possibility of concurrent
access to st_gdata data members.
Hold spin lock while calling st_reg_complete if st_kim_start() fails.

Signed-off-by: default avatarOleksandr Kozaruk <oleksandr.kozaruk@globallogic.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 666b9adc
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