stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "fix the regression from "direct-io: Fix negative return from dio read beyond eof"" has been added to the 4.1-stable tree
@ 2016-01-27 17:20 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-01-27 17:20 UTC (permalink / raw)
  To: viro, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    fix the regression from "direct-io: Fix negative return from dio read beyond eof"

to the 4.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     fix-the-regression-from-direct-io-fix-negative-return-from-dio-read-beyond-eof.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 2d4594acbf6d8f75a27f3578476b6a27d8b13ebb Mon Sep 17 00:00:00 2001
From: Al Viro <viro@zeniv.linux.org.uk>
Date: Tue, 8 Dec 2015 12:22:47 -0500
Subject: fix the regression from "direct-io: Fix negative return from dio read beyond eof"

From: Al Viro <viro@zeniv.linux.org.uk>

commit 2d4594acbf6d8f75a27f3578476b6a27d8b13ebb upstream.

Sure, it's better to bail out of past-the-eof read and return 0 than return
a bogus negative value on such.  Only we'd better make sure we are bailing out
with 0 and not -ENOMEM...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/direct-io.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -1165,6 +1165,7 @@ do_blockdev_direct_IO(struct kiocb *iocb
 		if (dio->flags & DIO_LOCKING)
 			mutex_unlock(&inode->i_mutex);
 		kmem_cache_free(dio_cache, dio);
+		retval = 0;
 		goto out;
 	}
 


Patches currently in stable-queue which might be from viro@zeniv.linux.org.uk are

queue-4.1/fix-the-regression-from-direct-io-fix-negative-return-from-dio-read-beyond-eof.patch
queue-4.1/staging-lustre-echo_copy.._lsm-dereferences-userland-pointers-directly.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-27 17:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-27 17:20 Patch "fix the regression from "direct-io: Fix negative return from dio read beyond eof"" has been added to the 4.1-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).