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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140916210441.GC24591@infradead.org>
Date:	Tue, 16 Sep 2014 14:04:41 -0700
From:	Christoph Hellwig <hch@...radead.org>
To:	Jeff Moyer <jmoyer@...hat.com>
Cc:	Milosz Tanski <milosz@...in.com>, linux-kernel@...r.kernel.org,
	Christoph Hellwig <hch@...radead.org>,
	linux-fsdevel@...r.kernel.org, linux-aio@...ck.org,
	Mel Gorman <mgorman@...e.de>,
	Volker Lendecke <Volker.Lendecke@...net.de>,
	Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH 7/7] check for O_NONBLOCK in all read_iter instances

On Tue, Sep 16, 2014 at 03:27:41PM -0400, Jeff Moyer wrote:
> Christoph Hellwig <milosz@...in.com> writes:
> 
> Hrm, you're not Christoph...
> 
> > Acked-by: Milosz Tanski <milosz@...in.com>
> > ---
> >  fs/ceph/file.c    |    2 ++
> >  fs/cifs/file.c    |    6 ++++++
> >  fs/nfs/file.c     |    5 ++++-
> >  fs/ocfs2/file.c   |    6 ++++++
> >  fs/pipe.c         |    3 ++-
> >  fs/read_write.c   |   17 +++++++++++------
> >  fs/xfs/xfs_file.c |    4 ++++
> >  mm/shmem.c        |    4 ++++
> >  8 files changed, 39 insertions(+), 8 deletions(-)
> >
> > diff --git a/fs/ceph/file.c b/fs/ceph/file.c
> > index 4776257..b62e3a5 100644
> > --- a/fs/ceph/file.c
> > +++ b/fs/ceph/file.c
> > @@ -808,6 +808,8 @@ again:
> >  	if ((got & (CEPH_CAP_FILE_CACHE|CEPH_CAP_FILE_LAZYIO)) == 0 ||
> >  	    (iocb->ki_filp->f_flags & O_DIRECT) ||
> >  	    (fi->flags & CEPH_F_SYNC)) {
> > +		if (flags & O_NONBLOCK)
> > +			return -EAGAIN;
> 
> Again, the right return value for the O_DIRECT case is EINVAL.

Is it?  We define -EAGAIN as it would block, which is defintively true
for O_DIRECT reads.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ