mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [char-misc-next] mei: nfc: mei_nfc_free has to be called under lock
@ 2014-01-08 18:57 Tomas Winkler
  0 siblings, 0 replies; only message in thread
From: Tomas Winkler @ 2014-01-08 18:57 UTC (permalink / raw)
  To: gregkh; +Cc: arnd, linux-kernel, stable, Tomas Winkler

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>
---
 drivers/misc/mei/nfc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/misc/mei/nfc.c b/drivers/misc/mei/nfc.c
index 0a89220..5496190 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;
 }
-- 
1.8.4.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-08 18:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-08 18:57 [char-misc-next] mei: nfc: mei_nfc_free has to be called under lock Tomas Winkler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®