All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Trond Myklebust <trondmy@hammerspace.com>
Cc: "oe-kbuild@lists.linux.dev" <oe-kbuild@lists.linux.dev>,
	"lkp@intel.com" <lkp@intel.com>,
	"oe-kbuild-all@lists.linux.dev" <oe-kbuild-all@lists.linux.dev>
Subject: Re: [trondmy-nfs-2.6:testing 8/17] fs/nfs/read.c:358 nfs_read_folio() warn: variable dereferenced before check 'file' (see line 335)
Date: Wed, 11 Jan 2023 21:23:27 +0300	[thread overview]
Message-ID: <Y77+n9MyHgx/alA4@kadam> (raw)
In-Reply-To: <4CEE5F8A-9AE9-4235-8B94-77F842331C64@hammerspace.com>

On Wed, Jan 11, 2023 at 02:55:00PM +0000, Trond Myklebust wrote:
> 
> 
> > On Jan 11, 2023, at 03:54, Dan Carpenter <error27@gmail.com> wrote:
> > 
> > [You don't often get email from error27@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> > 
> > tree:   git://git.linux-nfs.org/projects/trondmy/nfs-2.6.git testing
> > head:   653d2b50cb73b541465920a748c6b1a1edf240d0
> > commit: c87e83b9f933cc75e6c5ce2f99d333713e87cb6f [8/17] NFS: Convert buffered reads to use folios
> > config: i386-randconfig-m021
> > compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
> > 
> > If you fix the issue, kindly add following tag where applicable
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Reported-by: Dan Carpenter <error27@gmail.com>
> > 
> > smatch warnings:
> > fs/nfs/read.c:358 nfs_read_folio() warn: variable dereferenced before check 'file' (see line 335)
> > 
> > 

[ snip ]

> 
> I think that’s a false positive. From what I can see after auditing
> all the callers, ‘file’ is guaranteed to be non-NULL, so the above
> check should probably have been retired years ago.

When I build Smatch with the cross function DB then it silences the
warning because Smatch also thinks "file" can't be NULL.

The cross function DB takes too long for the kbuild bot though so I only
do that on my own system.

regards,
dan carpenter


  reply	other threads:[~2023-01-11 18:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11  8:35 [trondmy-nfs-2.6:testing 8/17] fs/nfs/read.c:358 nfs_read_folio() warn: variable dereferenced before check 'file' (see line 335) kernel test robot
2023-01-11  8:54 ` Dan Carpenter
2023-01-11 14:55 ` Trond Myklebust
2023-01-11 18:23   ` Dan Carpenter [this message]
2023-01-11 18:45     ` Trond Myklebust

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=Y77+n9MyHgx/alA4@kadam \
    --to=error27@gmail.com \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    --cc=trondmy@hammerspace.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.