lkml.org 
[lkml]   [2015]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: fix lockdep build in rcu-protected get_mm_exe_file()
On 03/24, Konstantin Khlebnikov wrote:
>
> On Tue, Mar 24, 2015 at 9:10 PM, Oleg Nesterov <oleg@redhat.com> wrote:
> >>>
> >>> "atomic_read(&mm->mm_users) <= 1" looks a bit more "safe". But again,
> >>> I won't insist.
> >>
> >> Not so safe: this will race with get_task_mm().
> >
> > How?
>
> I mean rcu/lockdep debug migh race with get_task_mm() and generate
> false-positive warning about non-protected rcu_dereference.

Still can't understand, I think it can't... and if it could, then this
warning would not be false positive.

Anut this doesn't matter because we seem to agree this check should go away.

> > Yeees, probably rcu_dereference_raw() would be even better. set_mm_exe_file()
> > must be called only if nobody but us can access this mm.
>
> Yep.

Great. Davidlohr will you agree?

Oleg.



\
 
 \ /
  Last update: 2015-03-24 20:21    [W:0.080 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site