diff mbox

[4.2.y-ckt,stable] Patch "dax_io(): don't let non-error value escape via retval instead of EFAULT" has been added to staging queue

Message ID 1451949775-26853-1-git-send-email-kamal@canonical.com
State New
Headers show

Commit Message

Kamal Mostafa Jan. 4, 2016, 11:22 p.m. UTC
This is a note to let you know that I have just added a patch titled

    dax_io(): don't let non-error value escape via retval instead of EFAULT

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

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

------

From d0fa447231cf7f1e8cb662e3b10f62b77b575f72 Mon Sep 17 00:00:00 2001
From: Al Viro <viro@ZenIV.linux.org.uk>
Date: Tue, 10 Nov 2015 19:42:49 -0700
Subject: dax_io(): don't let non-error value escape via retval instead of
 EFAULT

commit cadfbb6ec2e55171479191046142c927a8b12d87 upstream.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 fs/dax.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--
1.9.1
diff mbox

Patch

diff --git a/fs/dax.c b/fs/dax.c
index ef35a20..a3eb5b0 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -162,8 +162,10 @@  static ssize_t dax_io(struct inode *inode, struct iov_iter *iter,
 		else
 			len = iov_iter_zero(max - pos, iter);

-		if (!len)
+		if (!len) {
+			retval = -EFAULT;
 			break;
+		}

 		pos += len;
 		addr += len;