[4.2.y-ckt stable] Patch "fix the regression from "direct-io: Fix negative return from dio read beyond eof"" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Fri Jan 15 20:12:42 UTC 2016
This is a note to let you know that I have just added a patch titled
fix the regression from "direct-io: Fix negative return from dio read beyond eof"
to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue
This patch is scheduled to be released in version 4.2.8-ckt2.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
---8<------------------------------------------------------------
>From 2d02e002a0e978dd5457044e0c1159cfd2800fed Mon Sep 17 00:00:00 2001
From: Al Viro <viro at 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"
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 at zeniv.linux.org.uk>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
fs/direct-io.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 6bc4bac..d83a021 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -1165,6 +1165,7 @@ do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode,
if (dio->flags & DIO_LOCKING)
mutex_unlock(&inode->i_mutex);
kmem_cache_free(dio_cache, dio);
+ retval = 0;
goto out;
}
--
1.9.1
More information about the kernel-team
mailing list