]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Aug 2013 06:11:04 +0000 (23:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Aug 2013 06:11:04 +0000 (23:11 -0700)
added patches:
perf-tools-add-anonymous-huge-page-recognition.patch
vfs-d_obtain_alias-needs-to-use-as-default-name.patch

queue-3.4/perf-tools-add-anonymous-huge-page-recognition.patch [new file with mode: 0644]
queue-3.4/series
queue-3.4/vfs-d_obtain_alias-needs-to-use-as-default-name.patch [new file with mode: 0644]

diff --git a/queue-3.4/perf-tools-add-anonymous-huge-page-recognition.patch b/queue-3.4/perf-tools-add-anonymous-huge-page-recognition.patch
new file mode 100644 (file)
index 0000000..75fbe3b
--- /dev/null
@@ -0,0 +1,48 @@
+From d0528b5d71faf612014dd7672e44225c915344b2 Mon Sep 17 00:00:00 2001
+From: Joshua Zhu <zhu.wen-jie@hp.com>
+Date: Sat, 5 Jan 2013 13:29:57 +0800
+Subject: perf tools: Add anonymous huge page recognition
+
+From: Joshua Zhu <zhu.wen-jie@hp.com>
+
+commit d0528b5d71faf612014dd7672e44225c915344b2 upstream.
+
+Judging anonymous memory's vm_area_struct, perf_mmap_event's filename
+will be set to "//anon" indicating this vma belongs to anonymous
+memory.
+
+Once hugepage is used, vma's vm_file points to hugetlbfs. In this way,
+this vma will not be regarded as anonymous memory by is_anon_memory() in
+perf user space utility.
+
+Signed-off-by: Joshua Zhu <zhu.wen-jie@hp.com>
+Cc: Akihiro Nagai <akihiro.nagai.hw@hitachi.com>
+Cc: Andi Kleen <andi@firstfloor.org>
+Cc: David Ahern <dsahern@gmail.com>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: Jiri Olsa <jolsa@redhat.com>
+Cc: Joshua Zhu <zhu.wen-jie@hp.com>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Cc: Paul Mackerras <paulus@samba.org>
+Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Cc: Vinson Lee <vlee@freedesktop.org>
+Link: http://lkml.kernel.org/r/1357363797-3550-1-git-send-email-zhu.wen-jie@hp.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/perf/util/map.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/tools/perf/util/map.c
++++ b/tools/perf/util/map.c
+@@ -15,7 +15,8 @@ const char *map_type__name[MAP__NR_TYPES
+ static inline int is_anon_memory(const char *filename)
+ {
+-      return strcmp(filename, "//anon") == 0;
++      return !strcmp(filename, "//anon") ||
++             !strcmp(filename, "/anon_hugepage (deleted)");
+ }
+ static inline int is_no_dso_memory(const char *filename)
index c84e3c3dbd60aecc6723a6a69f11a2d6cce8dc51..bed3841d8dea59b7b017dea24d358cad856a8abc 100644 (file)
@@ -13,3 +13,5 @@ usb-core-don-t-try-to-reset_device-a-port-that-got-just-disconnected.patch
 debugfs-debugfs_remove_recursive-must-not-rely-on-list_empty-d_subdirs.patch
 tracing-fix-fields-of-struct-trace_iterator-that-are-zeroed-by-mistake.patch
 scsi-nsp32-use-mdelay-instead-of-large-udelay-constants.patch
+vfs-d_obtain_alias-needs-to-use-as-default-name.patch
+perf-tools-add-anonymous-huge-page-recognition.patch
diff --git a/queue-3.4/vfs-d_obtain_alias-needs-to-use-as-default-name.patch b/queue-3.4/vfs-d_obtain_alias-needs-to-use-as-default-name.patch
new file mode 100644 (file)
index 0000000..83c365d
--- /dev/null
@@ -0,0 +1,50 @@
+From 150086ca6bd7493e7753f923a3f55e73701253b3 Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.de>
+Date: Thu, 8 Nov 2012 16:09:37 -0800
+Subject: vfs: d_obtain_alias() needs to use "/" as default name.
+
+From: NeilBrown <neilb@suse.de>
+
+commit b911a6bdeef5848c468597d040e3407e0aee04ce upstream.
+
+NFS appears to use d_obtain_alias() to create the root dentry rather than
+d_make_root.  This can cause 'prepend_path()' to complain that the root
+has a weird name if an NFS filesystem is lazily unmounted.  e.g.  if
+"/mnt" is an NFS mount then
+
+ { cd /mnt; umount -l /mnt ; ls -l /proc/self/cwd; }
+
+will cause a WARN message like
+   WARNING: at /home/git/linux/fs/dcache.c:2624 prepend_path+0x1d7/0x1e0()
+   ...
+   Root dentry has weird name <>
+
+to appear in kernel logs.
+
+So change d_obtain_alias() to use "/" rather than "" as the anonymous
+name.
+
+Signed-off-by: NeilBrown <neilb@suse.de>
+Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+[bwh: Backported to 3.2: use named initialisers instead of QSTR_INIT()]
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/dcache.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/dcache.c
++++ b/fs/dcache.c
+@@ -1556,7 +1556,7 @@ EXPORT_SYMBOL(d_find_any_alias);
+  */
+ struct dentry *d_obtain_alias(struct inode *inode)
+ {
+-      static const struct qstr anonstring = { .name = "" };
++      static const struct qstr anonstring = { .name = "/", .len = 1 };
+       struct dentry *tmp;
+       struct dentry *res;