Re: futex.c and EWOULDBLOCK vs. EAGAIN patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 15, 2010 at 07:24:54AM -0400, Carlos O'Donell wrote:
> An application that checked only for EWOULDBLOCK might fail now that
> EAGAIN is being returned.
> 
> Is this a concern? I don't think it is. The POSIX standard, in all
> cases I could find, says the functions return "EAGAIN or EWOULDBLOCK",
> meaning that a conforming program must check for both.
> 

It's a two instruction penalty(*) in the kernel syscall return path, just
do it there. I've got a box at Red Hat with all the source to the whole
damn world on it we run greps against to look for dumb stuff like memcpy
bugs. I'll toss a grep for EAGAIN and not EWOULDBLOCK and vice versa and
see how much stuff might b0rk.

We discussed this a couple years ago, and it ended up being a complete
rats nest of error returns that needed fixing.

regards, Kyle.

*: CMPI,N(=), LDI, maybe a third since I don't remember how sign
extension works off the top of my head.
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux