All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: Dan Carpenter <error27@gmail.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 18:45:47 +0000	[thread overview]
Message-ID: <A846DACF-A13D-42BC-B1BA-A97A7956890E@hammerspace.com> (raw)
In-Reply-To: <Y77+n9MyHgx/alA4@kadam>



> On Jan 11, 2023, at 13:23, Dan Carpenter <error27@gmail.com> wrote:
> 
> 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.
> 

Cool! I’ll add a patch to this series to just remove that check altogether.

Thanks, Dan!

_________________________________
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com


      reply	other threads:[~2023-01-11 18:45 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
2023-01-11 18:45     ` Trond Myklebust [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=A846DACF-A13D-42BC-B1BA-A97A7956890E@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=error27@gmail.com \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    /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.