From: Theodore Ts'o <tytso@mit.edu>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: ext4 crypto: enforce context consistency
Date: Thu, 16 Apr 2015 02:15:45 -0400 [thread overview]
Message-ID: <20150416061545.GA7445@thunk.org> (raw)
In-Reply-To: <20150415191007.GA32654@mwanda>
On Wed, Apr 15, 2015 at 10:10:07PM +0300, Dan Carpenter wrote:
> Hello Theodore Ts'o,
>
> The patch faac02be2843: "ext4 crypto: enforce context consistency"
> from Apr 12, 2015, leads to the following static checker warning:
>
> fs/ext4/namei.c:1646 ext4_lookup()
> error: 'inode' dereferencing possible ERR_PTR()
>
> fs/ext4/namei.c
> 1638 inode = ext4_iget_normal(dir->i_sb, ino);
> 1639 if (inode == ERR_PTR(-ESTALE)) {
>
> We normally check ext4_iget() against -ESTALE, but then we changed this
> to ext4_iget_normal() which returns several error values.
Thanks for pointing that out. That's not quite what had happened. We
were using ext4_iget_normal() before (and both ext4_iget() and
ext4_iget_normal() can return multiple error values), but before we
fell out to the bottof of the function where we called
d_splice_alias() which would take care of ERR_PTR versions of inode.
We added some additional code between the ext4_iget_normal() and the
d_splice_alias() lines, which is what introduced the problem.
I'll take care of fixing it.
Cheers,
- Ted
prev parent reply other threads:[~2015-04-16 6:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 19:10 ext4 crypto: enforce context consistency Dan Carpenter
2015-04-16 6:15 ` Theodore Ts'o [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=20150416061545.GA7445@thunk.org \
--to=tytso@mit.edu \
--cc=dan.carpenter@oracle.com \
--cc=linux-ext4@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;
as well as URLs for NNTP newsgroup(s).