From: Greg Kroah-Hartman Date: Tue, 13 Aug 2013 06:11:01 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.0.91~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3373b15c9913e5292af464a5e31c7f2c977b0087;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: perf-tools-add-anonymous-huge-page-recognition.patch vfs-d_obtain_alias-needs-to-use-as-default-name.patch --- diff --git a/queue-3.0/perf-tools-add-anonymous-huge-page-recognition.patch b/queue-3.0/perf-tools-add-anonymous-huge-page-recognition.patch new file mode 100644 index 00000000000..a5ca3c4002a --- /dev/null +++ b/queue-3.0/perf-tools-add-anonymous-huge-page-recognition.patch @@ -0,0 +1,48 @@ +From d0528b5d71faf612014dd7672e44225c915344b2 Mon Sep 17 00:00:00 2001 +From: Joshua Zhu +Date: Sat, 5 Jan 2013 13:29:57 +0800 +Subject: perf tools: Add anonymous huge page recognition + +From: Joshua Zhu + +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 +Cc: Akihiro Nagai +Cc: Andi Kleen +Cc: David Ahern +Cc: Ingo Molnar +Cc: Jiri Olsa +Cc: Joshua Zhu +Cc: Namhyung Kim +Cc: Paul Mackerras +Cc: Peter Zijlstra +Cc: Vinson Lee +Link: http://lkml.kernel.org/r/1357363797-3550-1-git-send-email-zhu.wen-jie@hp.com +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman + +--- + 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)"); + } + + void map__init(struct map *self, enum map_type type, diff --git a/queue-3.0/series b/queue-3.0/series index 37c11650092..f9845d85fd1 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -8,3 +8,5 @@ debugfs-debugfs_remove_recursive-must-not-rely-on-list_empty-d_subdirs.patch cifs-silence-compiler-warnings-showing-up-with-gcc-4.7.0.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.0/vfs-d_obtain_alias-needs-to-use-as-default-name.patch b/queue-3.0/vfs-d_obtain_alias-needs-to-use-as-default-name.patch new file mode 100644 index 00000000000..0ba74fdc331 --- /dev/null +++ b/queue-3.0/vfs-d_obtain_alias-needs-to-use-as-default-name.patch @@ -0,0 +1,50 @@ +From 150086ca6bd7493e7753f923a3f55e73701253b3 Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Thu, 8 Nov 2012 16:09:37 -0800 +Subject: vfs: d_obtain_alias() needs to use "/" as default name. + +From: NeilBrown + +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 +Cc: Trond Myklebust +Cc: Al Viro +Signed-off-by: Andrew Morton +Signed-off-by: Al Viro +[bwh: Backported to 3.2: use named initialisers instead of QSTR_INIT()] +Signed-off-by: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman + +--- + fs/dcache.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/dcache.c ++++ b/fs/dcache.c +@@ -1563,7 +1563,7 @@ static struct dentry * 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; +