From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-f45.google.com ([209.85.161.45]:43979 "EHLO mail-yw1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729960AbeK1DLi (ORCPT ); Tue, 27 Nov 2018 22:11:38 -0500 MIME-Version: 1.0 References: <00000000000074e10d0576cc48f1@google.com> <0000000000001ec857057ba01589@google.com> In-Reply-To: From: Amir Goldstein Date: Tue, 27 Nov 2018 18:13:03 +0200 Message-ID: Subject: Re: possible deadlock in ovl_write_iter To: Dmitry Vyukov Cc: syzbot+695726bc473f9c36a4b6@syzkaller.appspotmail.com, Miklos Szeredi , linux-fsdevel , linux-kernel , overlayfs , syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > > 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.