This is a note to let you know that I've just added the patch titled
kernfs: add back missing error check in kernfs_fop_mmap()
to the 3.14-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:
kernfs-add-back-missing-error-check-in-kernfs_fop_mmap.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From b44b2140265ddfde03acbe809336111d31adb0d1 Mon Sep 17 00:00:00 2001
From: Tejun Heo <[email protected]>
Date: Sun, 20 Apr 2014 08:29:21 -0400
Subject: kernfs: add back missing error check in kernfs_fop_mmap()
From: Tejun Heo <[email protected]>
commit b44b2140265ddfde03acbe809336111d31adb0d1 upstream.
While updating how mmap enabled kernfs files are handled by lockdep,
9b2db6e18945 ("sysfs: bail early from kernfs_file_mmap() to avoid
spurious lockdep warning") inadvertently dropped error return check
from kernfs_file_mmap(). The intention was just dropping "if
(ops->mmap)" check as the control won't reach the point if the mmap
callback isn't implemented, but I mistakenly removed the error return
check together with it.
This led to Xorg crash on i810 which was reported and bisected to the
commit and then to the specific change by Tobias.
Signed-off-by: Tejun Heo <[email protected]>
Reported-and-bisected-by: Tobias Powalowski <[email protected]>
Tested-by: Tobias Powalowski <[email protected]>
References: http://lkml.kernel.org/g/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/kernfs/file.c | 2 ++
1 file changed, 2 insertions(+)
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -476,6 +476,8 @@ static int kernfs_fop_mmap(struct file *
ops = kernfs_ops(of->kn);
rc = ops->mmap(of, vma);
+ if (rc)
+ goto out_put;
/*
* PowerPC's pci_mmap of legacy_mem uses shmem_zero_setup()
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/pata_at91-fix-ata_host_activate-failure-handling.patch
queue-3.14/kernfs-add-back-missing-error-check-in-kernfs_fop_mmap.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html