RE: Multi-Threaded fork() correctness on Linux 2.4 & 2.6

From: Linus Torvalds
Date: Mon Sep 19 2005 - 15:48:10 EST




On Mon, 19 Sep 2005, Smarduch Mario-CMS063 wrote:
>
> But I don't see the samething in 2.4.31 (which what we're using now).

I'm pretty sure 2.4.x should have the mmap_sem too.

But I think there it's aquired by the caller of dup_mmap() (ie it's
"copy_mm()" that gets the mmap_sem and holds it for the duration of
dup_mmap).

In fact, I'm sure: the mmap_sem was changed from a regular semaphore to a
read-write semaphore in 2.4.2.5, and we definitely took it around
dup_mmap() at that point.

Of course, maybe some broken change removed it later in 2.4.x, I don't
keep a current 2.4.x tree around.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/