linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Shaohua Li <shli@fb.com>,
	Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	kernel-team@fb.com
Subject: [PATCH] proc: add missing 'mm' variable in nommu is_stack()
Date: Thu, 21 Jan 2016 11:49:42 +0100	[thread overview]
Message-ID: <2208534.bqAiu8Kgku@wuerfel> (raw)
In-Reply-To: <1453226559-17322-1-git-send-email-hannes@cmpxchg.org>

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) {

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      parent reply	other threads:[~2016-01-21 10:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19 18:02 [PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation Johannes Weiner
2016-01-19 22:14 ` Andrew Morton
2016-01-19 23:30   ` Kirill A. Shutemov
2016-01-20  3:21     ` Siddhesh Poyarekar
2016-01-19 23:38   ` Johannes Weiner
2016-01-20  3:17   ` Siddhesh Poyarekar
2016-01-20  5:27     ` Andrew Morton
2016-01-21 10:49 ` Arnd Bergmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2208534.bqAiu8Kgku@wuerfel \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shli@fb.com \
    --cc=siddhesh.poyarekar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox