"David S. Miller" <davem@redhat.com> writes:
> Eric W. Biederman writes:
> > In building a patch for 2.4.3 I also discovered that we are not taking
> > the mmap_sem around do_brk in the exec paths.
>
> Does that really matter?
In the library loader I can certainly see it making a difference.
> Who else can get at the address space?
> We are a singly referenced address space at that point... perhaps ptrace?
In practice I don't see it being a big deal. But reliable code is
made by closing all of the little loop holes.
It also improves consistency as all of the calls to do_mmap are
already protected in the exec paths.
And of course since much of the code in the kernel is built on the
copy a good example neglecting the locking without a big comment,
invites trouble elsewhere like in elf_load_library. Where we could
have multiple threads running.
Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Apr 23 2001 - 21:00:44 EST