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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 27 Mar 2014 12:53:58 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Rainer Weikusat' <rweikusat@...ileactivedefense.com>
CC:	Eric Dumazet <eric.dumazet@...il.com>,
	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>
Subject: RE: [PATCH] net: unix: non blocking recvmsg() should not return
 -EINTR

From: Rainer Weikusat 
> Considering all of this, the trylock-approach seems best to me. OTOH,

No - using trylock() is definitely wrong.
If there are two messages queued and two processes/threads try to
read them, you don't want one of them being given EAGAIN.

If we ignore the case where there are some blocking and some
non-blocking readers (which doesn't work for other reasons)
then it would actually make sense for the non-blocking
code to wait uninterruptibly (possibly with a timeout that
should never expire) and for the blocking code to wait
interruptibly (as currently).

Then problem of which error code to return is moot.

	David



--
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