From: bob.picco@hp.com
To: akpm@osdl.org
Cc: pj@sgi.com, simon.derr@bull.net, linux-kernel@vger.kernel.org,
bob.picco@hp.com
Subject: [PATCH] cpuset - fix return without releasing semaphore
Date: Fri, 11 Nov 2005 19:20:45 -0700 (MST) [thread overview]
Message-ID: <20051112022122.22085.45247.sendpatchset@localhost.localdomain> (raw)
It seems wrong to acquire the semaphore and then return from
cpuset_zone_allowed without releasing it. This was only compile tested.
bob
Signed-off-by: Bob Picco <bob.picco@hp.com>
kernel/cpuset.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Index: linux-2.6.14-mm1/kernel/cpuset.c
===================================================================
--- linux-2.6.14-mm1.orig/kernel/cpuset.c 2005-11-07 07:00:13.000000000 -0500
+++ linux-2.6.14-mm1/kernel/cpuset.c 2005-11-09 17:56:28.000000000 -0500
@@ -2036,11 +2036,12 @@ int cpuset_zone_allowed(struct zone *z,
if (gfp_mask & __GFP_HARDWALL) /* If hardwall request, stop here */
return 0;
+ if (current->flags & PF_EXITING) /* Let dying task have memory */
+ return 1;
+
/* Not hardwall and node outside mems_allowed: scan up cpusets */
down(&callback_sem);
- if (current->flags & PF_EXITING) /* Let dying task have memory */
- return 1;
task_lock(current);
cs = nearest_exclusive_ancestor(current->cpuset);
task_unlock(current);
next reply other threads:[~2005-11-12 2:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-12 2:20 bob.picco [this message]
2005-11-12 18:17 ` [PATCH] cpuset - fix return without releasing semaphore Paul Jackson
2005-11-12 19:26 ` Paul Jackson
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=20051112022122.22085.45247.sendpatchset@localhost.localdomain \
--to=bob.picco@hp.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pj@sgi.com \
--cc=simon.derr@bull.net \
/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