Re: [PATCH] aio: fix kernel bug when page is temporally busy

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

 



On Fri, 9 Feb 2007, Andrew Morton wrote:

> > @@ -1204,7 +1204,7 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
> >  			do_generic_file_read(filp,ppos,&desc,file_read_actor);
> >  			retval += desc.written;
> >  			if (desc.error) {
> > -				retval = retval ?: desc.error;
> > +				retval = desc.error;
> >  				break;
> >  			}
> Nope.  On error the read() syscall must return the number of bytes which
> were successfully read.

You are right. 

In current mainline this even is not a problem, because noone seems to be 
setting the error values to EIOCBRETRY. But it still stinks a bit, as 
there are tests for EIOCBRETRY.

-- 
Jiri Kosina
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux