From: Dan Carpenter <dan.carpenter@oracle.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org
Subject: re: ext4 crypto: enforce context consistency
Date: Wed, 15 Apr 2015 22:10:07 +0300 [thread overview]
Message-ID: <20150415191007.GA32654@mwanda> (raw)
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.
1640 EXT4_ERROR_INODE(dir,
1641 "deleted inode referenced: %u",
1642 ino);
1643 return ERR_PTR(-EIO);
1644 }
1645 if (ext4_encrypted_inode(dir) &&
1646 (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
1647 S_ISLNK(inode->i_mode)) &&
1648 !ext4_is_child_context_consistent_with_parent(dir,
1649 inode)) {
1650 iput(inode);
1651 ext4_warning(inode->i_sb,
1652 "Inconsistent encryption contexts: %lu/%lu\n",
1653 (unsigned long) dir->i_ino,
1654 (unsigned long) inode->i_ino);
1655 return ERR_PTR(-EPERM);
1656 }
regards,
dan carpenter
next reply other threads:[~2015-04-15 19:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 19:10 Dan Carpenter [this message]
2015-04-16 6:15 ` ext4 crypto: enforce context consistency Theodore Ts'o
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=20150415191007.GA32654@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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.