Re: [PATCH 7/8] FDPIC: Add coredump capability for the ELF-FDPIC binfmt [try #4]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/10, David Howells wrote:
>
> Oleg Nesterov <[email protected]> wrote:
>
> > Do you see any reason for tasklist_lock here (and in elf_core_dump) ?
> >
> > do_each_thread() is rcu-safe, and all tasks which use this ->mm must
> > sleep in wait_for_completion(&mm->core_done) at this point.
>
> Hmmm... do_each_thread() does not call rcu_read_lock/unlock(), but you may
> well be right.

Yes, we can't just kill tasklist_lock, we should replace it with rcu_read_lock.

>                 What about kernel threads running on another CPU with
> active_mm set to this mm (assuming I'm remembering correctly how that works)?
> I'm not sure they'd be a problem, though.

Those threads have ->mm == NULL, this loop will not count them. But I think
tasklist_lock can't make any difference for this issue. I am not sure I
understand your concern, it is ok to use this ->mm (current uses it), and
a kernel thread incremented ->mm_count.

Oleg.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux