Re: Found it! (was Re: [3.10] Oopses in kmem_cache_allocate() via prepare_creds())

2013-12-02 Thread Al Viro
On Mon, Dec 02, 2013 at 06:58:57PM -0800, Linus Torvalds wrote: > In other words, it's unsafe to protect reference counts inside objects > with anything but spinlocks and/or atomic refcounts. Or you have to > have the lock *outside* the object you're protecting (which is often > what you want for

Re: Found it! (was Re: [3.10] Oopses in kmem_cache_allocate() via prepare_creds())

2013-12-02 Thread Linus Torvalds
Once more on this issue, because I've been unable to stop thinking about it, and noticed that it's actually even subtler than I thought initially. On Mon, Dec 2, 2013 at 8:00 AM, Linus Torvalds wrote: > > All our reference counting etc seems right, but we have one very > subtle bug: on the

Re: Found it! (was Re: [3.10] Oopses in kmem_cache_allocate() via prepare_creds())

2013-12-02 Thread Al Viro
On Mon, Dec 02, 2013 at 08:00:38AM -0800, Linus Torvalds wrote: > On Sat, Nov 30, 2013 at 1:08 PM, Linus Torvalds > wrote: > > > > I still don't see what could be wrong with the pipe_inode_info thing, > > but the fact that it's been so consistent in your traces does make me > > suspect it really

Re: Found it! (was Re: [3.10] Oopses in kmem_cache_allocate() via prepare_creds())

2013-12-02 Thread Ingo Molnar
* Al Viro wrote: > On Mon, Dec 02, 2013 at 05:27:55PM +0100, Ingo Molnar wrote: > > > It's not like there should be many (any?) VFS operations where a pipe > > is used via i_mutex and pipe->mutex in parallel, which would improve > > scalability - so I don't see the scalability advantage.

Re: Found it! (was Re: [3.10] Oopses in kmem_cache_allocate() via prepare_creds())

2013-12-02 Thread Al Viro
On Mon, Dec 02, 2013 at 05:27:55PM +0100, Ingo Molnar wrote: > It's not like there should be many (any?) VFS operations where a pipe > is used via i_mutex and pipe->mutex in parallel, which would improve > scalability - so I don't see the scalability advantage. (But I might > be missing

Re: Found it! (was Re: [3.10] Oopses in kmem_cache_allocate() via prepare_creds())

2013-12-02 Thread Ingo Molnar
* Linus Torvalds wrote: > On Sat, Nov 30, 2013 at 1:08 PM, Linus Torvalds > wrote: > > > > I still don't see what could be wrong with the pipe_inode_info thing, > > but the fact that it's been so consistent in your traces does make me > > suspect it really is *that* particular slab. > > I

Found it! (was Re: [3.10] Oopses in kmem_cache_allocate() via prepare_creds())

2013-12-02 Thread Linus Torvalds
On Sat, Nov 30, 2013 at 1:08 PM, Linus Torvalds wrote: > > I still don't see what could be wrong with the pipe_inode_info thing, > but the fact that it's been so consistent in your traces does make me > suspect it really is *that* particular slab. I think I finally found it. I've spent waaayy

Found it! (was Re: [3.10] Oopses in kmem_cache_allocate() via prepare_creds())

2013-12-02 Thread Linus Torvalds
On Sat, Nov 30, 2013 at 1:08 PM, Linus Torvalds torva...@linux-foundation.org wrote: I still don't see what could be wrong with the pipe_inode_info thing, but the fact that it's been so consistent in your traces does make me suspect it really is *that* particular slab. I think I finally found

Re: Found it! (was Re: [3.10] Oopses in kmem_cache_allocate() via prepare_creds())

2013-12-02 Thread Ingo Molnar
* Linus Torvalds torva...@linux-foundation.org wrote: On Sat, Nov 30, 2013 at 1:08 PM, Linus Torvalds torva...@linux-foundation.org wrote: I still don't see what could be wrong with the pipe_inode_info thing, but the fact that it's been so consistent in your traces does make me suspect

Re: Found it! (was Re: [3.10] Oopses in kmem_cache_allocate() via prepare_creds())

2013-12-02 Thread Al Viro
On Mon, Dec 02, 2013 at 05:27:55PM +0100, Ingo Molnar wrote: It's not like there should be many (any?) VFS operations where a pipe is used via i_mutex and pipe-mutex in parallel, which would improve scalability - so I don't see the scalability advantage. (But I might be missing something)

Re: Found it! (was Re: [3.10] Oopses in kmem_cache_allocate() via prepare_creds())

2013-12-02 Thread Ingo Molnar
* Al Viro v...@zeniv.linux.org.uk wrote: On Mon, Dec 02, 2013 at 05:27:55PM +0100, Ingo Molnar wrote: It's not like there should be many (any?) VFS operations where a pipe is used via i_mutex and pipe-mutex in parallel, which would improve scalability - so I don't see the scalability

Re: Found it! (was Re: [3.10] Oopses in kmem_cache_allocate() via prepare_creds())

2013-12-02 Thread Al Viro
On Mon, Dec 02, 2013 at 08:00:38AM -0800, Linus Torvalds wrote: On Sat, Nov 30, 2013 at 1:08 PM, Linus Torvalds torva...@linux-foundation.org wrote: I still don't see what could be wrong with the pipe_inode_info thing, but the fact that it's been so consistent in your traces does make me

Re: Found it! (was Re: [3.10] Oopses in kmem_cache_allocate() via prepare_creds())

2013-12-02 Thread Linus Torvalds
Once more on this issue, because I've been unable to stop thinking about it, and noticed that it's actually even subtler than I thought initially. On Mon, Dec 2, 2013 at 8:00 AM, Linus Torvalds torva...@linux-foundation.org wrote: All our reference counting etc seems right, but we have one very

Re: Found it! (was Re: [3.10] Oopses in kmem_cache_allocate() via prepare_creds())

2013-12-02 Thread Al Viro
On Mon, Dec 02, 2013 at 06:58:57PM -0800, Linus Torvalds wrote: In other words, it's unsafe to protect reference counts inside objects with anything but spinlocks and/or atomic refcounts. Or you have to have the lock *outside* the object you're protecting (which is often what you want for