From 3a2d3d213d7c9bb427cc5bdb0de34fe18a22363e Mon Sep 17 00:00:00 2001 From: Oleksandr Kozaruk Date: Thu, 29 Aug 2013 10:55:48 +0300 Subject: [PATCH] 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: Oleksandr Kozaruk Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed