From: Andrea Arcangeli <andrea@e-mind.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
linux-kernel@vger.rutgers.edu, werner@suse.de, mlord@pobox.com,
"David S. Miller" <davem@dm.COBALTMICRO.COM>,
gandalf@szene.CH, adamk@3net.net.pl, kiracofe.8@osu.edu,
ksi@ksi-linux.COM, djf-lists@ic.NET, tomh@taz.ccs.fau.edu,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-mm@kvack.org
Subject: Re: [patch] fixed both processes in D state and the /proc/ oopses [Re: [patch] Fixed the race that was oopsing Linux-2.2.0]
Date: Thu, 28 Jan 1999 23:04:42 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.3.96.990128205918.438B-100000@laser.bogus> (raw)
In-Reply-To: <Pine.LNX.3.95.990128095147.32418F-100000@penguin.transmeta.com>
On Thu, 28 Jan 1999, Linus Torvalds wrote:
> Incorrect, see my previous email. It may not be strictly necessary right
> now due to us probably holding the kernel lock everywhere, but it is
> conceptually necessary, and it is _not_ an argument for a spinlock.
If you remove the kernel lock around do_exit() you _need_ my mm_lock
spinlock. You need it to make atomic the decreasing of mm->count and
current->mm = &init_mm. If the two instructions are not atomic you have
_no_ way to know if you can mmget() at any time the mm of a process.
I repeat in another way (just trying to avoid English mistakes):
decreasing mm->count has to go in sync with updating current->mm,
otherwise you don't know if you can access the mm of a process (and so
also touching mm->count) because the mm of such process could be just been
deallocated (the process could be a zombie).
As far I can see the mm->count will _never_ have 1 reason to be atomic_t
even removing the function lock_kernel() from
/usr/src/linux/include/asm/smplock.h .
Using an int for mm->count (isntead of atomic_t) is far from be something
of magic. Doing that change it means that I don't expect work by magic,
but I know that it will work fine. It's instead magic (out of the human
reason) how the kernel works now, if you think that we _need_ atomic_t
instead of int.
It's hard for me to be quiet even if you asked me to go away because I
think you are plain wrong telling that we need mm->count atomic_t for the
future.
Andrea Arcangeli
PS. You have not hurted me asking me to go away, because I _always_ do the
_best_ I _can_, and if my best is plain wrong I can't change this reality.
What I care is to do the best I can. Maybe I should really go away and do
something in my sparetime where it's not requested to be clever... I hope
it's not the case though and that you wasn't serious.
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
next prev parent reply other threads:[~1999-01-28 22:47 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.3.96.990127123207.15486A-100000@laser.bogus>
[not found] ` <Pine.LNX.3.96.990127131315.19147A-100000@laser.bogus>
1999-01-27 21:38 ` Stephen C. Tweedie
1999-01-27 21:45 ` Linus Torvalds
1999-01-28 1:02 ` Andrea Arcangeli
1999-01-28 2:50 ` Andrea Arcangeli
1999-01-28 4:20 ` [patch] fixed both processes in D state and the /proc/ oopses Tom Holroyd
1999-01-28 6:23 ` Tom Holroyd
1999-01-28 15:09 ` [patch] fixed both processes in D state and the /proc/ oopses [Re: [patch] Fixed the race that was oopsing Linux-2.2.0] Stephen C. Tweedie
1999-01-28 17:54 ` Linus Torvalds
1999-01-28 18:07 ` Stephen C. Tweedie
1999-01-28 18:17 ` Linus Torvalds
1999-01-28 18:25 ` Stephen C. Tweedie
1999-01-28 19:23 ` Alan Cox
1999-01-28 19:11 ` Linus Torvalds
1999-01-28 20:11 ` Alan Cox
1999-01-28 22:33 ` Andrea Arcangeli
1999-01-28 22:53 ` Linus Torvalds
1999-01-29 1:47 ` Andrea Arcangeli
1999-01-29 11:20 ` MOLNAR Ingo
1999-01-29 12:08 ` Andrea Arcangeli
1999-01-29 13:19 ` MOLNAR Ingo
1999-01-29 14:14 ` Andrea Arcangeli
1999-01-29 17:46 ` Theodore Y. Ts'o
1999-01-29 14:13 ` Eric W. Biederman
1999-01-30 15:42 ` Andrea Arcangeli
1999-01-30 20:32 ` Eric W. Biederman
1999-01-31 1:00 ` Andrea Arcangeli
1999-01-31 8:36 ` Eric W. Biederman
1999-01-31 19:16 ` Andrea Arcangeli
1999-01-31 21:56 ` Eric W. Biederman
1999-01-29 18:24 ` Linus Torvalds
1999-01-28 22:04 ` Andrea Arcangeli [this message]
1999-01-29 0:17 ` Linus Torvalds
1999-01-28 17:36 ` Linus Torvalds
1999-01-28 15:05 ` Stephen C. Tweedie
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=Pine.LNX.3.96.990128205918.438B-100000@laser.bogus \
--to=andrea@e-mind.com \
--cc=adamk@3net.net.pl \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davem@dm.COBALTMICRO.COM \
--cc=djf-lists@ic.NET \
--cc=gandalf@szene.CH \
--cc=kiracofe.8@osu.edu \
--cc=ksi@ksi-linux.COM \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=mlord@pobox.com \
--cc=sct@redhat.com \
--cc=tomh@taz.ccs.fau.edu \
--cc=torvalds@transmeta.com \
--cc=werner@suse.de \
/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