From: syzbot <syzbot+2f73ed585f115e98aee8@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] task hung in exfat_write_inode
Date: Wed, 29 Nov 2023 23:55:51 -0800 [thread overview]
Message-ID: <000000000000078063060b59fb38@google.com> (raw)
In-Reply-To: <000000000000db858c05f06f30b0@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: task hung in exfat_write_inode
Author: lizhi.xu@windriver.com
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f9ff5644bcc0
diff --git a/fs/exfat/file.c b/fs/exfat/file.c
index bfdfafe00993..a3ace4fc555c 100644
--- a/fs/exfat/file.c
+++ b/fs/exfat/file.c
@@ -116,6 +116,7 @@ int __exfat_truncate(struct inode *inode)
exfat_chain_set(&clu, ei->start_clu, num_clusters_phys, ei->flags);
+ mutex_unlock(&sbi->s_lock);
if (i_size_read(inode) > 0) {
/*
* Truncate FAT chain num_clusters after the first cluster
@@ -134,8 +135,10 @@ int __exfat_truncate(struct inode *inode)
} else {
while (num_clusters > 0) {
last_clu = clu.dir;
+ mutex_lock(&sbi->s_lock);
if (exfat_get_next_cluster(sb, &(clu.dir)))
return -EIO;
+ mutex_unlock(&sbi->s_lock);
num_clusters--;
clu.size--;
@@ -160,6 +163,7 @@ int __exfat_truncate(struct inode *inode)
* __exfat_write_inode() is called for directory entry, bitmap
* and FAT to be written in a same writeback.
*/
+ mutex_lock(&sbi->s_lock);
if (__exfat_write_inode(inode, inode_needs_sync(inode)))
return -EIO;
next prev parent reply other threads:[~2023-11-30 7:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-22 18:53 [syzbot] [exfat?] INFO: task hung in exfat_write_inode syzbot
2023-11-29 21:42 ` syzbot
2023-11-30 7:28 ` [syzbot] " syzbot
2023-11-30 7:55 ` syzbot [this message]
2023-11-30 8:43 ` syzbot
2023-12-21 4:50 ` Lizhi Xu
2023-12-21 5:18 ` [syzbot] [exfat?] INFO: " syzbot
2023-12-21 6:11 ` Lizhi Xu
2023-12-21 6:35 ` [syzbot] [exfat?] INFO: " syzbot
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=000000000000078063060b59fb38@google.com \
--to=syzbot+2f73ed585f115e98aee8@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