From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <lkp@intel.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
Amir Goldstein <amir73il@gmail.com>, Jan Kara <jack@suse.cz>
Subject: Re: [linux-next:master] BUILD REGRESSION 605cbf3d5f20470ec303b79feda3202935f4a142
Date: Thu, 20 Aug 2020 13:40:06 -0700 [thread overview]
Message-ID: <20200820134006.ce03bfbb54650fd99de0f09c@linux-foundation.org> (raw)
In-Reply-To: <5f3edc64.qkHsk6Qli55TwDHw%lkp@intel.com>
On Fri, 21 Aug 2020 04:26:12 +0800 kernel test robot <lkp@intel.com> wrote:
> tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> branch HEAD: 605cbf3d5f20470ec303b79feda3202935f4a142 Add linux-next specific files for 20200820
>
> Error/Warning in current branch:
>
> fs/notify/fsnotify.c:460 fsnotify() warn: variable dereferenced before check 'inode' (see line 449)
Yes, this:
: if (!inode) {
: /* Dirent event - report on TYPE_INODE to dir */
: inode = dir;
: } else if (mask & FS_EVENT_ON_CHILD) {
: /*
: * Event on child - report on TYPE_INODE to dir if it is
: * watching children and on TYPE_CHILD to child.
: */
: child = inode;
: inode = dir;
: }
`inode' is non-NULL here.
: sb = inode->i_sb;
So this is OK.
: /*
: * Optimization: srcu_read_lock() has a memory barrier which can
: * be expensive. It protects walking the *_fsnotify_marks lists.
: * However, if we do not walk the lists, we do not have to do
: * SRCU because we have no references to any objects and do not
: * need SRCU to keep them "alive".
: */
: if (!sb->s_fsnotify_marks &&
: (!mnt || !mnt->mnt_fsnotify_marks) &&
: (!inode || !inode->i_fsnotify_marks) &&
So !inode is always false.
: (!child || !child->i_fsnotify_marks))
: return 0;
I assume we can just zap the "!inode ||". Amir & Jan, can you
please take a look?
next prev parent reply other threads:[~2020-08-20 20:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 20:26 kernel test robot
2020-08-20 20:40 ` Andrew Morton [this message]
2020-08-20 21:03 ` Amir Goldstein
2020-08-20 20:43 ` Andrew Morton
2020-08-23 3:41 ` Philip Li
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=20200820134006.ce03bfbb54650fd99de0f09c@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=amir73il@gmail.com \
--cc=jack@suse.cz \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.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