lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20110622.164214.415427796273622733.davem@davemloft.net>
Date:	Wed, 22 Jun 2011 16:42:14 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	ddaney@...iumnetworks.com
Cc:	netdev@...r.kernel.org
Subject: Re: Weird locking in __release_sock()?

From: David Daney <ddaney@...iumnetworks.com>
Date: Wed, 22 Jun 2011 16:31:13 -0700

> In the case of an IPv4 TCP socket, sk_backlog_rcv() calls
> tcp_v4_do_rcv(), which is documented like this:
> 
> /* The socket must have it's spinlock held when we get
>  * here.
> .
> .
> .
> */
> 
> Q: How can this be correct?

sk->lock.owned will be "1" while the backlog is processed.

Exclusive access to the socket is indicated by one of the
following two conditions being true:

1) sk->lock.slock being held
2) sk->lock.owned being non-zero
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ