Re: kernfs: possible deadlock between of->mutex and mmap_sem

2014-03-03 Thread Tejun Heo
On Mon, Mar 03, 2014 at 05:44:52PM -0500, Sasha Levin wrote: > >>I'll send a patch to fix it some time next week unless someone beats me to > >>it :) > > > >How are you planning to fix it? Prolly the right thing to do would be > >caching atomic_write_len in open_file and copy data before grabbing

Re: kernfs: possible deadlock between of->mutex and mmap_sem

2014-03-03 Thread Sasha Levin
On 03/03/2014 05:39 PM, Tejun Heo wrote: On Fri, Feb 28, 2014 at 08:14:45PM -0500, Sasha Levin wrote: Hi all, I've stumbled on the following while fuzzing with trinity inside a KVM tools running the latest -next kernel. We deal with files that have an mmap op by giving them a different locking

Re: kernfs: possible deadlock between of->mutex and mmap_sem

2014-03-03 Thread Tejun Heo
On Fri, Feb 28, 2014 at 08:14:45PM -0500, Sasha Levin wrote: > Hi all, > > I've stumbled on the following while fuzzing with trinity inside a > KVM tools running the latest -next kernel. > > We deal with files that have an mmap op by giving them a different > locking class than the files which do

Re: kernfs: possible deadlock between of->mutex and mmap_sem

2014-03-01 Thread Dave Chinner
On Fri, Feb 28, 2014 at 08:14:45PM -0500, Sasha Levin wrote: > Hi all, > > I've stumbled on the following while fuzzing with trinity inside a > KVM tools running the latest -next kernel. > > We deal with files that have an mmap op by giving them a different > locking class than the files which do

kernfs: possible deadlock between of->mutex and mmap_sem

2014-02-28 Thread Sasha Levin
Hi all, I've stumbled on the following while fuzzing with trinity inside a KVM tools running the latest -next kernel. We deal with files that have an mmap op by giving them a different locking class than the files which don't due to mmap_sem nesting being different for those files. We assum