lkml.org 
[lkml]   [2014]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: cred_guard_mutex vs seq_file::lock [was: Re: 3.14.0+/x86: lockdep and mutexes not getting along]
On Fri, Apr 11, 2014 at 03:50:27PM +0100, David Howells wrote:
> Peter Zijlstra <peterz@infradead.org> wrote:
>
> > Al, David, any bright ideas on how to best fix this?
>
> Have the seq_xxx() code throw an error if current->in_execve is true. I can't
> think of any circumstance where execve() should be reading anything that uses
> seq_xxx().

*cringe*

I don't like it. That really should be a responsiblity of specific ->show();
"I'm going to take that mutex, bugger off if we are in execve()" makes a lot
more sense than having e.g. seq_read() care of that. IOW, I would very
much prefer the patch you've sent last week.

And yes, it might leave lockdep false positives, but that's better dealt with
by annotating the sucker ("this guy has a separate lockdep class for its
->lock"). E.g. by splitting proc_single_file_operations in two and having
the one used for those files do lockdep_set_class() in its ->open().


\
 
 \ /
  Last update: 2014-04-11 17:41    [W:0.120 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site