]> Pileus Git - ~andy/linux/commitdiff
mei: nfc: mei_nfc_free has to be called under lock
authorTomas Winkler <tomas.winkler@intel.com>
Wed, 8 Jan 2014 18:57:44 +0000 (20:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jan 2014 23:27:42 +0000 (15:27 -0800)
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>
drivers/misc/mei/nfc.c

index 0a892205ce7e6314fa53f8b9046f8a6d7e57206a..54961903bf21c22071986fd69f6e6578bf4392eb 100644 (file)
@@ -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;
 }