firewire: nosy: fix list corruption by NOSY_IOC_STOP
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Thu, 22 Jul 2010 09:56:38 +0000 (11:56 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Tue, 27 Jul 2010 09:04:10 +0000 (11:04 +0200)
nosy_stop_snoop() would blow up the second time it was called without
nosy_start_snoop() in between.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/nosy.c

index 6470514..637e514 100644 (file)
@@ -276,7 +276,7 @@ nosy_stop_snoop(struct client *client)
        unsigned long flags;
 
        spin_lock_irqsave(&client->lynx->client_list_lock, flags);
-       list_del(&client->link);
+       list_del_init(&client->link);
        spin_unlock_irqrestore(&client->lynx->client_list_lock, flags);
 }