mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shigeru Yoshida <syoshida@redhat.com>
To: Carlos Maiolino <cem@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	 "Darrick J. Wong" <djwong@kernel.org>,
	 Deepanshu Kartikey <kartikey406@gmail.com>,
	linux-xfs@vger.kernel.org,  linux-kernel@vger.kernel.org,
	syzbot+ccdf3469f5f653bff7ac@syzkaller.appspotmail.com
Subject: Re: [PATCH] xfs: take hm->lock in xfs_ioc_health_monitor() before insert
Date: Thu, 10 Sep 2026 22:42:53 +0900	[thread overview]
Message-ID: <87y0d99q8y.fsf@redhat.com> (raw)
In-Reply-To: <aqJ6yulX3XBEoj4u@andromeda.toxiclabs.cc> (Carlos Maiolino's message of "Thu, 10 Sep 2026 11:40:09 +0200")

Carlos Maiolino <cem@kernel.org> writes:

> On Wed, Sep 09, 2026 at 10:07:56PM -0700, Christoph Hellwig wrote:
>> On Sun, Sep 06, 2026 at 09:51:50PM -0700, Darrick J. Wong wrote:
>> > On Sun, Sep 06, 2026 at 08:16:29PM +0530, Deepanshu Kartikey wrote:
>> > > __xfs_healthmon_insert() asserts that hm->lock is held
>> > > (lockdep_assert_held), but xfs_ioc_health_monitor() called it right
>> > > after allocating hm, before ever taking the lock, triggering a
>> > > lockdep warning.
>> > > 
>> > > Take hm->lock around the call.
>> > > 
>> > > Fixes: b3a289a2a9397 ("xfs: create event queuing, formatting, and discovery infrastructure")
>> > > Reported-by: syzbot+ccdf3469f5f653bff7ac@syzkaller.appspotmail.com
>> > > Closes: https://syzkaller.appspot.com/bug?extid=ccdf3469f5f653bff7ac
>> > > Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com>
>> > 
>> > Heh, I added a patch just like this one to my own tree.
>> > Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
>> 
>> Can we get this queued up ASAP?  It's also causing a lot of failures in
>> our zoned XFS CI.
>> 
>> 
>
> Done. It's in for-next already. Not sure if I'll manage to push the
> attrs fsblock fix yet this -rc, but this one will go to Linus on
> Saturday

I noticed that the second mutex operation in this commit was
accidentally left as mutex_lock() instead of mutex_unlock(). I've
sent a fix as a separate patch ("xfs: fix double mutex_lock() call
in xfs_ioc_health_monitor()"). Feel free to use it if it helps.

Thanks,
Shigeru


  reply	other threads:[~2026-09-10 13:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-06 14:46 Deepanshu Kartikey
2026-09-07  4:51 ` Darrick J. Wong
2026-09-10  5:07   ` Christoph Hellwig
2026-09-10  6:22     ` Carlos Maiolino
2026-09-10  6:23     ` Carlos Maiolino
2026-09-10  9:40     ` Carlos Maiolino
2026-09-10 13:42       ` Shigeru Yoshida [this message]
2026-09-10 14:33         ` Carlos Maiolino
2026-09-10  9:11 ` Carlos Maiolino
2026-09-11  7:29 ` Carlos Maiolino

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=87y0d99q8y.fsf@redhat.com \
    --to=syoshida@redhat.com \
    --cc=cem@kernel.org \
    --cc=djwong@kernel.org \
    --cc=hch@infradead.org \
    --cc=kartikey406@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=syzbot+ccdf3469f5f653bff7ac@syzkaller.appspotmail.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

all inboxes | Powered by JetHome®