Re: Linux 2.3.99pre9-2 JOB list

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Thu May 18 2000 - 05:23:18 EST


> > Locking on getcwd
> Details, please? I'm currently dealing with that area, so if you give some
> details I could check this one.

current->fs->pwd can change under the getcwd call. We take a copy of pwd
but nothing I can see stops pwd being deleted as we use it. We even sleep
and do memory allocations in the loop that might cause dcache cleaning.

What stops this occuring if thread1/2 share current->fs

        thread1 thread2
        sys_getcwd sys_chdir
        copy pwd
                                                unref pwd (ref now 0)
                                                new pwd
        current->pwd changed on us (OK)

        alloc mem,
        page out
        clean up dcache
        deref pwd
        BOOM!

Alan

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



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:15 EST