From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:43810 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933339AbcA0RU6 (ORCPT ); Wed, 27 Jan 2016 12:20:58 -0500 Subject: Patch "fix the regression from "direct-io: Fix negative return from dio read beyond eof"" has been added to the 4.1-stable tree To: viro@zeniv.linux.org.uk, gregkh@linuxfoundation.org Cc: , From: Date: Wed, 27 Jan 2016 09:20:55 -0800 Message-ID: <1453915255455@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From 2d4594acbf6d8f75a27f3578476b6a27d8b13ebb Mon Sep 17 00:00:00 2001 From: Al Viro 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 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 Signed-off-by: Greg Kroah-Hartman --- 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