summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2014-01-08 20:57:44 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-08 15:27:42 -0800
commit0631213f3f6ee776db2fb2136778b570d6a17cab (patch)
tree011bacb947019388fb66557f3ca131a59318b863 /drivers/misc
parent66ae460b13c31a176b41550259683c841a62af3e (diff)
downloadkernel-common-0631213f3f6ee776db2fb2136778b570d6a17cab.tar.gz
kernel-common-0631213f3f6ee776db2fb2136778b570d6a17cab.tar.bz2
kernel-common-0631213f3f6ee776db2fb2136778b570d6a17cab.zip
mei: nfc: mei_nfc_free has to be called under lock
nfc_nfc_free unlink clients from the device list and has to be called under mei mutex Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reviewed-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/mei/nfc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/mei/nfc.c b/drivers/misc/mei/nfc.c
index 0a892205ce7e..54961903bf21 100644
--- a/drivers/misc/mei/nfc.c
+++ b/drivers/misc/mei/nfc.c
@@ -469,7 +469,9 @@ static void mei_nfc_init(struct work_struct *work)
return;
err:
+ mutex_lock(&dev->device_lock);
mei_nfc_free(ndev);
+ mutex_unlock(&dev->device_lock);
return;
}