public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Luis Henriques <luis@igalia.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	 linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	 kernel-janitors@vger.kernel.org
Subject: Re: [PATCH next] fuse: Uninitialized variable in fuse_epoch_work()
Date: Fri, 21 Nov 2025 13:53:48 +0000	[thread overview]
Message-ID: <873467mqz7.fsf@wotan.olymp> (raw)
In-Reply-To: <aSBqUPeT2JCLDsGk@stanley.mountain> (Dan Carpenter's message of "Fri, 21 Nov 2025 16:34:08 +0300")

On Fri, Nov 21 2025, Dan Carpenter wrote:

> The "fm" pointer is either valid or uninitialized so checking for NULL
> doesn't work.  Check the "inode" pointer instead.

Hmm?  Why do you say 'fm' isn't initialised?  That's what fuse_ilookup()
is doing, isn't it?

Cheers,
-- 
Luís

> Fixes: 64becd224ff9 ("fuse: new work queue to invalidate dentries from old epochs")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  fs/fuse/dir.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
> index 761f4a14dc95..ec5042b47abb 100644
> --- a/fs/fuse/dir.c
> +++ b/fs/fuse/dir.c
> @@ -201,7 +201,7 @@ void fuse_epoch_work(struct work_struct *work)
>  	inode = fuse_ilookup(fc, FUSE_ROOT_ID, &fm);
>  	iput(inode);
>  
> -	if (fm) {
> +	if (inode) {
>  		/* Remove all possible active references to cached inodes */
>  		shrink_dcache_sb(fm->sb);
>  	} else
> -- 
> 2.51.0
>

  reply	other threads:[~2025-11-21 13:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-21 13:34 [PATCH next] fuse: Uninitialized variable in fuse_epoch_work() Dan Carpenter
2025-11-21 13:53 ` Luis Henriques [this message]
2025-11-21 17:43   ` Dan Carpenter
2025-11-22 10:23     ` Luis Henriques
2025-11-24  6:05       ` Dan Carpenter

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=873467mqz7.fsf@wotan.olymp \
    --to=luis@igalia.com \
    --cc=dan.carpenter@linaro.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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