Re: cred_guard_mutex vs seq_file::lock [was: Re: 3.14.0+/x86: lockdep and mutexes not getting along]

2014-07-31 Thread Cyrill Gorcunov
On Thu, Jul 31, 2014 at 01:31:30AM +0300, Kirill A. Shutemov wrote: ... > > > > *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.

Re: cred_guard_mutex vs seq_file::lock [was: Re: 3.14.0+/x86: lockdep and mutexes not getting along]

2014-07-31 Thread Cyrill Gorcunov
On Thu, Jul 31, 2014 at 01:31:30AM +0300, Kirill A. Shutemov wrote: ... *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

Re: cred_guard_mutex vs seq_file::lock [was: Re: 3.14.0+/x86: lockdep and mutexes not getting along]

2014-07-30 Thread Kirill A. Shutemov
On Thu, Jul 31, 2014 at 01:31:30AM +0300, Kirill A. Shutemov wrote: > I don't know why we allow "chmod +x" on some proc files, notably net-related. > Is it a bug? # ls -l /proc/{1,157}/net/packet -r--r--r-- 1 root 0 0 Jul 30 23:01 /proc/1/net/packet -r--r--r-- 1 root 0 0 Jul 30 23:01

Re: cred_guard_mutex vs seq_file::lock [was: Re: 3.14.0+/x86: lockdep and mutexes not getting along]

2014-07-30 Thread Kirill A. Shutemov
On Fri, Apr 11, 2014 at 04:07:25PM +0100, Al Viro wrote: > On Fri, Apr 11, 2014 at 03:50:27PM +0100, David Howells wrote: > > Peter Zijlstra 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 >

Re: cred_guard_mutex vs seq_file::lock [was: Re: 3.14.0+/x86: lockdep and mutexes not getting along]

2014-07-30 Thread Kirill A. Shutemov
On Fri, Apr 11, 2014 at 04:07:25PM +0100, Al Viro wrote: On Fri, Apr 11, 2014 at 03:50:27PM +0100, David Howells wrote: Peter Zijlstra pet...@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.

Re: cred_guard_mutex vs seq_file::lock [was: Re: 3.14.0+/x86: lockdep and mutexes not getting along]

2014-07-30 Thread Kirill A. Shutemov
On Thu, Jul 31, 2014 at 01:31:30AM +0300, Kirill A. Shutemov wrote: I don't know why we allow chmod +x on some proc files, notably net-related. Is it a bug? # ls -l /proc/{1,157}/net/packet -r--r--r-- 1 root 0 0 Jul 30 23:01 /proc/1/net/packet -r--r--r-- 1 root 0 0 Jul 30 23:01

Re: cred_guard_mutex vs seq_file::lock [was: Re: 3.14.0+/x86: lockdep and mutexes not getting along]

2014-04-11 Thread Al Viro
On Fri, Apr 11, 2014 at 03:50:27PM +0100, David Howells wrote: > Peter Zijlstra 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

Re: cred_guard_mutex vs seq_file::lock [was: Re: 3.14.0+/x86: lockdep and mutexes not getting along]

2014-04-11 Thread David Howells
Peter Zijlstra 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(). David -- To unsubscribe from this list: send the

Re: cred_guard_mutex vs seq_file::lock [was: Re: 3.14.0+/x86: lockdep and mutexes not getting along]

2014-04-11 Thread David Howells
Peter Zijlstra pet...@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(). David -- To unsubscribe from

Re: cred_guard_mutex vs seq_file::lock [was: Re: 3.14.0+/x86: lockdep and mutexes not getting along]

2014-04-11 Thread Al Viro
On Fri, Apr 11, 2014 at 03:50:27PM +0100, David Howells wrote: Peter Zijlstra pet...@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

cred_guard_mutex vs seq_file::lock [was: Re: 3.14.0+/x86: lockdep and mutexes not getting along]

2014-04-10 Thread Peter Zijlstra
On Wed, Apr 09, 2014 at 03:19:40PM +0300, Kirill A. Shutemov wrote: > [ 26.747484] == > [ 26.748725] [ INFO: possible circular locking dependency detected ] > [ 26.748725] 3.13.0-11331-g6f008e72cd11 #1162 Not tainted > [ 26.748725]

cred_guard_mutex vs seq_file::lock [was: Re: 3.14.0+/x86: lockdep and mutexes not getting along]

2014-04-10 Thread Peter Zijlstra
On Wed, Apr 09, 2014 at 03:19:40PM +0300, Kirill A. Shutemov wrote: [ 26.747484] == [ 26.748725] [ INFO: possible circular locking dependency detected ] [ 26.748725] 3.13.0-11331-g6f008e72cd11 #1162 Not tainted [ 26.748725]