Re: bugfix in copy_mount_options()?

From: Tigran Aivazian (
Date: Fri May 05 2000 - 01:45:34 EST

On Thu, 4 May 2000 wrote:
> > It would seem that the callers of find_vma() are supposed to
> > down(&mm->mmap_sem) but copy_mount_options() does not do so and the
> > obvious attempt to make it do so results in a deadlock. Any ideas on the
> > reason how can copy_mount_options() safely call find_vma() without being
> > protected by mmap_sem semaphore?
> I presume you did an up on mmap_sem before the copy_from_user.

yes, I did.

> In any
> event, it looks like copy_mount_options is suffering from a case of bitrot
> -- copy_from_user provides us with exactly the data we need (the length
> of valid data at the address) as its return code -- how does the following
> patch look? (warning: it's untested)

Yes, I always wondered if those "extra" checks are really needed.. It
looks fine to me. So why not get rid of the similar stuff from
do_getname() of fs/namei.c?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:16 EST