From: kernel test robot <lkp@intel.com>
To: Daniel Colascione <dancol@google.com>
Cc: kbuild-all@lists.01.org, linux-security-module@vger.kernel.org,
James Morris <jmorris@namei.org>
Subject: [PATCH] fix err_cast.cocci warnings
Date: Wed, 8 Jul 2020 10:53:13 +0800 [thread overview]
Message-ID: <20200708025313.GA9647@57f8f660a35b> (raw)
In-Reply-To: <202007081008.YPssDcFv%lkp@intel.com>
From: kernel test robot <lkp@intel.com>
fs/anon_inodes.c:92:10-17: WARNING: ERR_CAST can be used with inode
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
Generated by: scripts/coccinelle/api/err_cast.cocci
Fixes: 2749d3f84a70 ("Add a new LSM-supporting anonymous inode interface")
CC: Daniel Colascione <dancol@google.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git secure_uffd_v5.9
head: d08ac70b1e0dc71ac2315007bcc3efb283b2eae4
commit: 2749d3f84a708110ed0359579be0eddd2c4036da [1/3] Add a new LSM-supporting anonymous inode interface
anon_inodes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/anon_inodes.c
+++ b/fs/anon_inodes.c
@@ -89,7 +89,7 @@ struct file *_anon_inode_getfile(const c
inode = anon_inode_make_secure_inode(
name, context_inode);
if (IS_ERR(inode))
- return ERR_PTR(PTR_ERR(inode));
+ return ERR_CAST(inode);
} else {
inode = anon_inode_inode;
if (IS_ERR(inode))
next prev parent reply other threads:[~2020-07-08 2:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 2:53 [security:secure_uffd_v5.9 1/3] fs/anon_inodes.c:92:10-17: WARNING: ERR_CAST can be used with inode kernel test robot
2020-07-08 2:53 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-06-04 11:19 kernel test robot
2020-06-04 11:19 ` [PATCH] fix err_cast.cocci warnings kernel test robot
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=20200708025313.GA9647@57f8f660a35b \
--to=lkp@intel.com \
--cc=dancol@google.com \
--cc=jmorris@namei.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-security-module@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).