Skip to contentSkip to conversation

Drop lock before calling nr_destroy_socket

NETROM Applied Ralf Baechle 2 participants 2 messages Jul 10, 2006 – Jul 11, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

nr_destroy_socket takes the socket lock itself so it should better be called with the socket unlocked.

---

net/netrom/nr_timer.c +1 -1
index 75b72d3..ddba1c1 100644
@@ -138,8 +138,8 @@ static void nr_heartbeat_expiry(unsigned
 		if (sock_flag(sk, SOCK_DESTROY) ||
 		    (sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD))) {
 			sock_hold(sk);
-			nr_destroy_socket(sk);
 			bh_unlock_sock(sk);
+			nr_destroy_socket(sk);
 			sock_put(sk);
 			return;
 		}