public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+4704b3cc972bd76024f1@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] Re: [btrfs?] kernel BUG in btrfs_get_ordered_extents_for_logging
Date: Fri, 30 Aug 2024 02:22:08 -0700	[thread overview]
Message-ID: <0000000000001806c20620e3205f@google.com> (raw)
In-Reply-To: <00000000000044ff540620d7dee2@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [btrfs?] kernel BUG in btrfs_get_ordered_extents_for_logging
Author: lizhi.xu@windriver.com

or i_mmap_lock ?

#syz test

diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c
index 82a68394a89c..d0187e1fb941 100644
--- a/fs/btrfs/ordered-data.c
+++ b/fs/btrfs/ordered-data.c
@@ -1015,7 +1015,8 @@ void btrfs_get_ordered_extents_for_logging(struct btrfs_inode *inode,
 {
 	struct rb_node *n;
 
-	ASSERT(inode_is_locked(&inode->vfs_inode));
+	ASSERT(inode_is_locked(&inode->vfs_inode) ||
+	       rwsem_is_locked(&inode->i_mmap_lock));
 
 	spin_lock_irq(&inode->ordered_tree_lock);
 	for (n = rb_first(&inode->ordered_tree); n; n = rb_next(n)) {

  reply	other threads:[~2024-08-30  9:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29 19:56 [syzbot] [btrfs?] kernel BUG in btrfs_get_ordered_extents_for_logging syzbot
2024-08-30  9:22 ` syzbot [this message]
2024-08-31  0:22 ` [PATCH] btrfs: Add assert or condition Lizhi Xu
2024-08-31 10:55   ` Filipe Manana
2024-08-31 12:41     ` Lizhi Xu

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=0000000000001806c20620e3205f@google.com \
    --to=syzbot+4704b3cc972bd76024f1@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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