Re: possible deadlock in ovl_write_iter
From: Amir Goldstein
Date: Tue Nov 27 2018 - 11:13:18 EST
> > This looks like a false positive because lockdep is not aware of
> > s_stack_depth of the file (fs) associated with the pipe.
>
> There must be some annotation to tell lockdep about this.
>
It's a long story that can be summed up as "not simple":
https://lkml.org/lkml/2017/9/21/63
Overlayfs annotates inode mutex in lockdep friendly manner.
This is why you see:
(&ovl_i_mutex_key[depth]){+.+.}, at: inode_lock
But this does not extend to other locks that may be associated
with filesystem or blockdev objects (e.g. pipe_lock()) and does
not cover the case of stacked blockdev (e.g. loop).
Thanks,
Amir.