]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
deleted 4.7/ipc-shm-fix-crash-if-config_shmem-is-not-set.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2016 06:06:37 +0000 (08:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2016 06:06:37 +0000 (08:06 +0200)
queue-4.7/ipc-shm-fix-crash-if-config_shmem-is-not-set.patch [deleted file]
queue-4.7/series

diff --git a/queue-4.7/ipc-shm-fix-crash-if-config_shmem-is-not-set.patch b/queue-4.7/ipc-shm-fix-crash-if-config_shmem-is-not-set.patch
deleted file mode 100644 (file)
index 9b44878..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-From 31b4beb473e3bdee1bf79db849502dcb24b5c202 Mon Sep 17 00:00:00 2001
-From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
-Date: Mon, 19 Sep 2016 14:44:18 -0700
-Subject: ipc/shm: fix crash if CONFIG_SHMEM is not set
-
-From: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-
-commit 31b4beb473e3bdee1bf79db849502dcb24b5c202 upstream.
-
-Commit c01d5b300774 ("shmem: get_unmapped_area align huge page") makes
-use of shm_get_unmapped_area() in shm_file_operations() unconditional to
-CONFIG_MMU.
-
-As Tony Battersby pointed this can lead NULL-pointer dereference on
-machine with CONFIG_MMU=y and CONFIG_SHMEM=n.  In this case ipc/shm is
-backed by ramfs which doesn't provide f_op->get_unmapped_area for
-configurations with MMU.
-
-The solution is to provide dummy f_op->get_unmapped_area for ramfs when
-CONFIG_MMU=y, which just call current->mm->get_unmapped_area().
-
-Fixes: c01d5b300774 ("shmem: get_unmapped_area align huge page")
-Link: http://lkml.kernel.org/r/20160912102704.140442-1-kirill.shutemov@linux.intel.com
-Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-Reported-by: Tony Battersby <tonyb@cybernetics.com>
-Tested-by: Tony Battersby <tonyb@cybernetics.com>
-Cc: Hugh Dickins <hughd@google.com>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ramfs/file-mmu.c |    9 +++++++++
- 1 file changed, 9 insertions(+)
-
---- a/fs/ramfs/file-mmu.c
-+++ b/fs/ramfs/file-mmu.c
-@@ -27,9 +27,17 @@
- #include <linux/fs.h>
- #include <linux/mm.h>
- #include <linux/ramfs.h>
-+#include <linux/sched.h>
- #include "internal.h"
-+static unsigned long ramfs_mmu_get_unmapped_area(struct file *file,
-+              unsigned long addr, unsigned long len, unsigned long pgoff,
-+              unsigned long flags)
-+{
-+      return current->mm->get_unmapped_area(file, addr, len, pgoff, flags);
-+}
-+
- const struct file_operations ramfs_file_operations = {
-       .read_iter      = generic_file_read_iter,
-       .write_iter     = generic_file_write_iter,
-@@ -38,6 +46,7 @@ const struct file_operations ramfs_file_
-       .splice_read    = generic_file_splice_read,
-       .splice_write   = iter_file_splice_write,
-       .llseek         = generic_file_llseek,
-+      .get_unmapped_area      = ramfs_mmu_get_unmapped_area,
- };
- const struct inode_operations ramfs_file_inode_operations = {
index 3953f0d468cd169cfcb2a3a60101ad5a2830e314..054a5855d8ca79d81d848b3adcc622dfc6b03c13 100644 (file)
@@ -12,7 +12,6 @@ disable-frame-address-warning.patch
 makefile-mute-warning-for-__builtin_return_address-0-for-tracing-only.patch
 xfs-prevent-dropping-ioend-completions-during-buftarg-wait.patch
 mm-fix-the-page_swap_info-bug_on-check.patch
-ipc-shm-fix-crash-if-config_shmem-is-not-set.patch
 fsnotify-add-a-way-to-stop-queueing-events-on-group-shutdown.patch
 fanotify-fix-list-corruption-in-fanotify_get_response.patch
 mm-memcontrol-make-per-cpu-charge-cache-irq-safe-for-socket-accounting.patch