Re: [maybe fixed.. i hope i hope i hope] Re: snipe hunt

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Thu May 04 2000 - 13:40:39 EST


From: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
>

> > My box agrees with you that my attempt is wrong. Moving the task_lock()
> > back too it's original position (up one) works best here, but it looks
> > like it was moved intentionally so I keep trying to make it act right
> > where it is. (Even with it back in original position, my box isn't very
> > stable atm)
>
> Moving the task lock back solves some problems and adds others.
>

I couldn't find the beginng of the thread, but what about using the same
locking as access_process_vm [kernel/ptrace.c] in proc_exe_link?

get_task_struct(); /* in proc_pid_make_inode */
task_lock();
/* task->mm can still change due to daemonize(), start_lazy_tlb() */
lock_kernel();
mm = task->mm;
if(!mm)
    goto out;
atomic_inc(&mm->mm_users);
unlock_kernel();

down(&mm->mmap_sem);
...

-
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 : Sun May 07 2000 - 21:00:15 EST