From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: [PATCH] configfs: User-driven configuration filesystem
Date: Mon, 07 Jul 2014 10:49:33 +0000 [thread overview]
Message-ID: <20140707104933.GA8740@mwanda> (raw)
Hello Joel Becker,
This is a semi-automatic email about new static checker warnings.
The patch 7063fbf22611: "[PATCH] configfs: User-driven configuration
filesystem" from Dec 15, 2005, leads to the following Smatch
complaint:
fs/configfs/inode.c:256 configfs_drop_dentry()
error: we previously assumed 'dentry->d_inode' could be null (see line 252)
fs/configfs/inode.c
251 spin_lock(&dentry->d_lock);
252 if (!(d_unhashed(dentry) && dentry->d_inode)) {
^^^^^^^^^^^^^^^
We want ->d_inode to be NULL (or d_unhashed() to be false).
253 dget_dlock(dentry);
254 __d_drop(dentry);
255 spin_unlock(&dentry->d_lock);
256 simple_unlink(parent->d_inode, dentry);
^^^^^^
But then we dereference dentry->d_inode here inside the call to
simple_unlink() which is puzzling and means the initial condition is
wrong somehow. Maybe the parenthesis are wrong and it should be:
if (!d_unhashed(dentry) && dentry->d_inode) {
257 } else
258 spin_unlock(&dentry->d_lock);
regards,
dan carpenter
reply other threads:[~2014-07-07 10:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20140707104933.GA8740@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/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