Skip to contentSkip to conversation

Patch "fix the regression from "direct-io: Fix negative return from dio read beyond eof"" has been added to the 4.1-stable tree

PATCH [email protected] 1 participant 1 message Jan 27, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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 <[email protected]> know about it.

Quoted 1 line

From 2d4594acbf6d8f75a27f3578476b6a27d8b13ebb Mon Sep 17 00:00:00 2001

From: Al Viro <[email protected]>
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 <[email protected]>

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...

---
 fs/direct-io.c |    1 +
 1 file changed, 1 insertion(+)
fs/direct-io.c +1 -0
@@ -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 [email protected] 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