mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: Lizhi Xu <lizhi.xu@windriver.com>,
	syzbot+6e516bb515d93230bc7b@syzkaller.appspotmail.com
Cc: shaggy@kernel.org, jfs-discussion@lists.sourceforge.net,
	syzkaller-bugs@googlegroups.com, linux-kernel@vger.kernel.org
Subject: Re: [Jfs-discussion] [PATCH] jfs: truncate good inode pages when hard link is 0
Date: Fri, 11 Jul 2025 15:18:31 -0500	[thread overview]
Message-ID: <76837be2-1938-46c2-b0f2-9644eb8ac30f@oracle.com> (raw)
In-Reply-To: <20250613030534.3839793-1-lizhi.xu@windriver.com>

On 6/12/25 10:05PM, Lizhi Xu via Jfs-discussion wrote:
> The fileset value of the inode copy from the disk by the reproducer is
> AGGR_RESERVED_I. When executing evict, its hard link number is 0, so its
> inode pages are not truncated. This causes the bugon to be triggered when
> executing clear_inode() because nrpages is greater than 0.

Looks good. I'll apply and test this.

Thanks,
Shaggy

> 
> Reported-by: syzbot+6e516bb515d93230bc7b@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=6e516bb515d93230bc7b
> Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
> ---
>   fs/jfs/inode.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
> index 60fc92dee24d..81e6b18e81e1 100644
> --- a/fs/jfs/inode.c
> +++ b/fs/jfs/inode.c
> @@ -145,9 +145,9 @@ void jfs_evict_inode(struct inode *inode)
>   	if (!inode->i_nlink && !is_bad_inode(inode)) {
>   		dquot_initialize(inode);
>   
> +		truncate_inode_pages_final(&inode->i_data);
>   		if (JFS_IP(inode)->fileset == FILESYSTEM_I) {
>   			struct inode *ipimap = JFS_SBI(inode->i_sb)->ipimap;
> -			truncate_inode_pages_final(&inode->i_data);
>   
>   			if (test_cflag(COMMIT_Freewmap, inode))
>   				jfs_free_zero_link(inode);


      reply	other threads:[~2025-07-11 20:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-12 11:53 [syzbot] [jfs?] kernel BUG in clear_inode (3) syzbot
2025-06-13  3:05 ` [PATCH] jfs: truncate good inode pages when hard link is 0 Lizhi Xu
2025-07-11 20:18   ` Dave Kleikamp [this message]

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=76837be2-1938-46c2-b0f2-9644eb8ac30f@oracle.com \
    --to=dave.kleikamp@oracle.com \
    --cc=jfs-discussion@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhi.xu@windriver.com \
    --cc=shaggy@kernel.org \
    --cc=syzbot+6e516bb515d93230bc7b@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

all inboxes | Powered by JetHome®