From: syzbot <syzbot+355da3b3a74881008e8f@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [jfs?] possible deadlock in diFree (2)
Date: Thu, 19 Dec 2024 00:24:45 -0800 [thread overview]
Message-ID: <6763d84d.050a0220.3157ee.0012.GAE@google.com> (raw)
In-Reply-To: <673f2511.050a0220.3c9d61.016e.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: Re: [syzbot] [jfs?] possible deadlock in diFree (2)
Author: lizhi.xu@windriver.com
In following calltrace, diAlloc and diFree need to hold same ag lock,
so before calling duplicateIXtree(), we maybe unlock it, and relock it after.
diAlloc()->
diAllocAG()->
diAllocExt()->
diNewIAG()->
duplicateIXtree()->
diFreeSpecial()->
evict()->
jfs_evict_inode()->
diFree()
#syz test
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
index a360b24ed320..ca25ff57c48a 100644
--- a/fs/jfs/jfs_imap.c
+++ b/fs/jfs/jfs_imap.c
@@ -2594,7 +2594,11 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp)
txEnd(tid);
mutex_unlock(&JFS_IP(ipimap)->commit_mutex);
+ IWRITE_UNLOCK(ipimap);
+ AG_UNLOCK(imap, agno);
duplicateIXtree(sb, blkno, xlen, &xaddr);
+ AG_LOCK(imap, agno);
+ IWRITE_LOCK(ipimap, RDWRLOCK_IMAP);
/* update the next available iag number */
imap->im_nextiag += 1;
next prev parent reply other threads:[~2024-12-19 8:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 12:18 syzbot
2024-12-19 2:56 ` [syzbot] " syzbot
2024-12-19 8:24 ` syzbot [this message]
2024-12-19 8:52 ` syzbot
2024-12-21 7:33 ` [PATCH] jfs: Prevent setting of nlink with value 0 from disk inode Edward Adam Davis
2024-12-24 8:17 ` [PATCH V2] jfs: Prevent copying " Edward Adam Davis
2025-02-19 16:38 ` [Jfs-discussion] " Dave Kleikamp
2025-02-20 11:13 ` [PATCH V3] " Edward Adam Davis
2025-02-20 16:15 ` Dave Kleikamp
2025-02-20 23:22 ` Edward Adam Davis
2025-02-20 23:28 ` Dave Kleikamp
2025-02-22 0:16 ` Edward Adam Davis
2025-02-24 14:56 ` Dave Kleikamp
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=6763d84d.050a0220.3157ee.0012.GAE@google.com \
--to=syzbot+355da3b3a74881008e8f@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
all inboxes | Powered by JetHome®