From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
akpm <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Junxiao Bi <junxiao.bi@oracle.com>, Jan Kara <jack@suse.com>,
"ocfs2-devel@lists.linux.dev" <ocfs2-devel@lists.linux.dev>
Subject: Re: [PATCH] ocfs2: free inode when ocfs2_get_init_inode() fails
Date: Sun, 24 Nov 2024 16:36:32 +0800 [thread overview]
Message-ID: <9ab2ceb5-1450-4207-b6bb-2a09432799d4@linux.alibaba.com> (raw)
In-Reply-To: <e68c0224-b7c6-4784-b4fa-a9fc8c675525@I-love.SAKURA.ne.jp>
On 11/23/24 9:28 PM, Tetsuo Handa wrote:
> syzbot is reporting busy inodes after unmount, for commit 9c89fe0af826
> ("ocfs2: Handle error from dquot_initialize()") forgot to call iput()
> when new_inode() succeeded and dquot_initialize() failed.
>
> Reported-by: syzbot+0af00f6a2cba2058b5db@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=0af00f6a2cba2058b5db
> Tested-by: syzbot+0af00f6a2cba2058b5db@syzkaller.appspotmail.com
> Fixes: 9c89fe0af826 ("ocfs2: Handle error from dquot_initialize()")
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/namei.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
> index 59c92353151a..5550f8afa438 100644
> --- a/fs/ocfs2/namei.c
> +++ b/fs/ocfs2/namei.c
> @@ -200,8 +200,10 @@ static struct inode *ocfs2_get_init_inode(struct inode *dir, umode_t mode)
> mode = mode_strip_sgid(&nop_mnt_idmap, dir, mode);
> inode_init_owner(&nop_mnt_idmap, inode, dir, mode);
> status = dquot_initialize(inode);
> - if (status)
> + if (status) {
> + iput(inode);
> return ERR_PTR(status);
> + }
>
> return inode;
> }
prev parent reply other threads:[~2024-11-24 8:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-23 13:28 Tetsuo Handa
2024-11-24 8:36 ` Joseph Qi [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=9ab2ceb5-1450-4207-b6bb-2a09432799d4@linux.alibaba.com \
--to=joseph.qi@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.com \
--cc=junxiao.bi@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ocfs2-devel@lists.linux.dev \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/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®