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
| ||
|
Message-ID: <20200805141151.GA16475@quack2.suse.cz> Date: Wed, 5 Aug 2020 16:11:51 +0200 From: Jan Kara <jack@...e.cz> To: Ted Tso <tytso@....edu> Cc: linux-ext4@...r.kernel.org, Jan Kara <jack@...e.cz> Subject: Re: [PATCH] ext4: Do not block RWF_NOWAIT dio write on unallocated space On Wed 08-07-20 17:35:16, Jan Kara wrote: > Since commit 378f32bab371 ("ext4: introduce direct I/O write using iomap > infrastructure") we don't properly bail out of RWF_NOWAIT direct IO > write if underlying blocks are not allocated. Also > ext4_dio_write_checks() does not honor RWF_NOWAIT when re-acquiring > i_rwsem. Fix both issues. > > Fixes: 378f32bab371 ("ext4: introduce direct I/O write using iomap infrastructure") > Reported-by: Filipe Manana <fdmanana@...il.com> > Signed-off-by: Jan Kara <jack@...e.cz> Ted, can you please merge this patch? Thanks! Honza > --- > fs/ext4/file.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/fs/ext4/file.c b/fs/ext4/file.c > index 2a01e31a032c..8f742b53f1d4 100644 > --- a/fs/ext4/file.c > +++ b/fs/ext4/file.c > @@ -428,6 +428,10 @@ static ssize_t ext4_dio_write_checks(struct kiocb *iocb, struct iov_iter *from, > */ > if (*ilock_shared && (!IS_NOSEC(inode) || *extend || > !ext4_overwrite_io(inode, offset, count))) { > + if (iocb->ki_flags & IOCB_NOWAIT) { > + ret = -EAGAIN; > + goto out; > + } > inode_unlock_shared(inode); > *ilock_shared = false; > inode_lock(inode); > -- > 2.16.4 > -- Jan Kara <jack@...e.com> SUSE Labs, CR
Powered by blists - more mailing lists