Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] tipc: avoid double lock 'spin_lock:&seq->lock'
@ 2014-12-09  7:17 Ying Xue
  2014-12-09 23:27 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Ying Xue @ 2014-12-09  7:17 UTC (permalink / raw)
  To: davem; +Cc: jon.maloy, dan.carpenter, erik.hugne, netdev, tipc-discussion

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>
---
 net/tipc/name_table.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index aafa684c..c8df022 100644
--- a/net/tipc/name_table.c
+++ b/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);
 }
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-09 23:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-09  7:17 [PATCH net-next] tipc: avoid double lock 'spin_lock:&seq->lock' Ying Xue
2014-12-09 23:27 ` David Miller

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