[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4EEF34BF.7050302@uclouvain.be>
Date: Mon, 19 Dec 2011 13:57:35 +0100
From: Christoph Paasch <christoph.paasch@...ouvain.be>
To: netdev@...r.kernel.org
Subject: tcp_close - why no WARN_ON ?
Hi all,
I am trying to understand the following code in tcp_close:
sock_orphan(sk);
/* It is the last release_sock in its life. It will remove backlog. */
release_sock(sk);
/* Now socket is owned by kernel and we acquire BH lock
to finish close. No need to check for user refs.
*/
local_bh_disable();
bh_lock_sock(sk);
WARN_ON(sock_owned_by_user(sk));
How is it possible that between release_sock(sk) and local_bh_disable(),
no other thread gets scheduled and calls lock_sock() and thus the
WARN_ON would be triggered ?
Can someone please point me to the lines of code that handle this ?
Thanks a lot,
Christoph
--
Christoph Paasch
PhD Student
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://mptcp.info.ucl.ac.be
Université Catholique de Louvain
--
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists