Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1314102

[PATCH] proc: add missing 'mm' variable in nommu is_stack()

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject [PATCH] proc: add missing 'mm' variable in nommu is_stack()
Date 2016-01-21 12:00 +0100
Message-ID <qTl86-45V-17@gated-at.bofh.it> (permalink)
References <qSIT9-33H-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


A recent revert left an incomplete function in fs/proc/task_nommu.c,
causing a build error for any NOMMU configuration with procfs:

fs/proc/task_nommu.c:132:28: error: 'mm' undeclared (first use in this function)
   stack = vma->vm_start <= mm->start_stack &&

Evidently, there is just a missing variable that is available
in the calling function but not inside of is_stack(). This
adds it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: e87d4fd02f40 ("proc: revert /proc/<pid>/maps [stack:TID] annotation")
---
This came up today on my ARM randconfig builds with linux-next.
I did not run the kernel to see if the code actually works, but
it seems straightforward enough.

diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index 60ab72e38f78..faacb0c0d857 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -126,6 +126,7 @@ unsigned long task_statm(struct mm_struct *mm,
 static int is_stack(struct proc_maps_private *priv,
 		    struct vm_area_struct *vma, int is_pid)
 {
+	struct mm_struct *mm = vma->vm_mm;
 	int stack = 0;
 
 	if (is_pid) {

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation Johannes Weiner <hannes@cmpxchg.org> - 2016-01-19 19:10 +0100
  Re: [PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation Andrew Morton <akpm@linux-foundation.org> - 2016-01-19 23:20 +0100
    Re: [PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation Johannes Weiner <hannes@cmpxchg.org> - 2016-01-20 00:40 +0100
    Re: [PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-01-20 00:40 +0100
      Re: [PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> - 2016-01-20 04:30 +0100
    Re: [PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> - 2016-01-20 04:20 +0100
      Re: [PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation Andrew Morton <akpm@linux-foundation.org> - 2016-01-20 06:30 +0100
  [PATCH] proc: add missing 'mm' variable in nommu is_stack() Arnd Bergmann <arnd@arndb.de> - 2016-01-21 12:00 +0100

csiph-web