From: Paul Jackson <pj@sgi.com>
To: Paul Jackson <pj@sgi.com>
Cc: Simon.Derr@bull.net, akpm@osdl.org, dino@in.ibm.com,
torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.12-rc4] cpuset exit NULL dereference fix
Date: Thu, 26 May 2005 17:24:14 -0700 [thread overview]
Message-ID: <20050526172414.473f9013.pj@sgi.com> (raw)
In-Reply-To: <20050526130713.2be9bed8.pj@sgi.com>
On rereading my post above, I realize that it is confusingly presented.
Let me try again ...
Issue (1) is that we might need parts of the cpuset to process
notify_on_release after we have released the cpuset by decrementing its
reference count to zero. Unless we hold the global cpuset_sem
semaphore, if we try to access that released cpuset to get what we need,
we can crash the kernel. This is the issue that prompted this patch.
Issue (2) is that we have two ways of tracking users of a cpuset, with
both a reference count of tasks linked to the cpuset, and also a linked
list of child cpusets. Unless we hold the global cpuset_sem semaphore,
there is no atomicly safe way to answer the question "is this cpuset
free now?"
The solution to Issue (1) is to make local variable copies of the
information we need from the cpuset, before we let go of it (before we
decrement its reference count).
The solution to Issue (2) is to have child cpusets also manipulate the
cpuset reference count, so that the cpuset reference count provides an
atomic way to detect all uses of a cpuset.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@engr.sgi.com> 1.650.933.1373, 1.925.600.0401
next prev parent reply other threads:[~2005-05-27 0:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-26 8:25 [PATCH 2.6.12-rc4] cpuset exit NULL dereference fix Paul Jackson
2005-05-26 9:00 ` Simon Derr
2005-05-26 12:08 ` Robin Holt
2005-05-26 15:44 ` Linus Torvalds
2005-05-26 18:46 ` Paul Jackson
2005-05-26 20:46 ` Paul Jackson
2005-05-26 13:54 ` Dinakar Guniguntala
2005-05-26 20:07 ` Paul Jackson
2005-05-27 0:24 ` Paul Jackson [this message]
2005-05-26 23:40 ` Paul Jackson
2005-05-27 8:07 ` Simon Derr
2005-05-27 8:44 ` 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=20050526172414.473f9013.pj@sgi.com \
--to=pj@sgi.com \
--cc=Simon.Derr@bull.net \
--cc=akpm@osdl.org \
--cc=dino@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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