public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>,
	syzbot <syzbot+019072ad24ab1d948228@syzkaller.appspotmail.com>,
	jk@ozlabs.org, linux-efi@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [efi?] [fs?] possible deadlock in efivarfs_actor
Date: Mon, 10 Mar 2025 23:25:30 +0000	[thread overview]
Message-ID: <20250310232530.GK2023217@ZenIV> (raw)
In-Reply-To: <CAMj1kXEfG=Q3pk6PsVZxf5qCjEBTwTjUCJcNwBPO3PqNmSp=hw@mail.gmail.com>

On Mon, Mar 10, 2025 at 07:24:43PM +0100, Ard Biesheuvel wrote:

> And one of the other logs has
> 
> [   47.650966][ T6617] syz.2.9/6617 is trying to acquire lock:
> [   47.652339][ T6617] ffff0000d69f6558
> (&sb->s_type->i_mutex_key#25){++++}-{4:4}, at:
> efivarfs_actor+0x1b8/0x2b8
> [   47.654943][ T6617]
> [   47.654943][ T6617] but task is already holding lock:
> [   47.656931][ T6617] ffff0000f5b84558
> (&sb->s_type->i_mutex_key#25){++++}-{4:4}, at: iterate_dir+0x3b4/0x5f4
> 
> where the locks have the same name but the address is different.
> 
> So there is something dodgy going on here, and I'm inclined to just ignore it.

That one is a false positive - iterate_dir() locks parent, then
callback locks child, but without bothering to tell lockdep about
that.  IOW, in actor you should use inode_lock_nested(inode, INODE_CHILD);
instead of inode_lock(inode).

  reply	other threads:[~2025-03-10 23:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-09  2:52 [syzbot] [efi?] [fs?] possible deadlock in efivarfs_actor syzbot
2025-03-10  7:21 ` Ard Biesheuvel
2025-03-10 16:50 ` James Bottomley
2025-03-10 18:21   ` Ard Biesheuvel
2025-03-10 18:24     ` Ard Biesheuvel
2025-03-10 23:25       ` Al Viro [this message]
2025-03-10 23:58     ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250310232530.GK2023217@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=ardb@kernel.org \
    --cc=jk@ozlabs.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+019072ad24ab1d948228@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox