Browse Source

tipc: avoid double lock 'spin_lock:&seq->lock'

The commit fb9962f3cefe ("tipc: ensure all name sequences are properly
protected with its lock") involves below errors:

net/tipc/name_table.c:980 tipc_purge_publications() error: double lock 'spin_lock:&seq->lock'

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ying Xue 10 years ago
parent
commit
023160bc8f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/tipc/name_table.c

+ 1 - 1
net/tipc/name_table.c

@@ -979,7 +979,7 @@ static void tipc_purge_publications(struct name_seq *seq)
 	}
 	hlist_del_init_rcu(&seq->ns_list);
 	kfree(seq->sseqs);
-	spin_lock_bh(&seq->lock);
+	spin_unlock_bh(&seq->lock);
 
 	kfree_rcu(seq, rcu);
 }