public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Konstantin Khlebnikov <khlebnikov@openvz•org>
To: Siddhesh Poyarekar <siddhesh.poyarekar@gmail•com>,
	Andrew Morton <akpm@linux-foundation•org>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: [PATCH linux-next] mm: fix rcu-lock/unlock balance in vm_is_stack()
Date: Wed, 21 Mar 2012 00:54:55 +0400	[thread overview]
Message-ID: <20120320205455.31285.23096.stgit@zurg> (raw)

Fix bug introduced in "procfs: mark thread stack correctly in proc/<pid>/maps"
(patch in mm/linux-next)

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz•org>
---
 mm/memory.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index ee85fc4..cc08b86 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3932,13 +3932,12 @@ pid_t vm_is_stack(struct task_struct *task,
 		while_each_thread(task, t) {
 			if (vm_is_stack_for_task(t, vma)) {
 				ret = t->pid;
-				goto done;
+				break;
 			}
 		}
+		rcu_read_unlock();
 	}
 
-done:
-	rcu_read_unlock();
 	return ret;
 }
 

             reply	other threads:[~2012-03-20 20:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 20:54 Konstantin Khlebnikov [this message]
2012-03-20 21:03 ` [PATCH linux-next] mm: fix rcu-lock/unlock balance in vm_is_stack() Andrew Morton

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=20120320205455.31285.23096.stgit@zurg \
    --to=khlebnikov@openvz$(echo .)org \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=siddhesh.poyarekar@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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