diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-12-14 23:05:10 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-12-14 23:05:10 +0300 |
commit | da0628559871475b482f015dc24c9bef372936e4 (patch) | |
tree | 321af8748bb3de173183d3d86816a7f46254dd9b /security/tomoyo/securityfs_if.c | |
parent | fab0fca1da5cdc48be051715cd9787df04fdce3a (diff) | |
parent | 15269fb193108ba8a3774507d0bbd70949ab610d (diff) | |
download | linux-da0628559871475b482f015dc24c9bef372936e4.tar.xz |
Merge tag 'tomoyo-pr-20201214' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1
Pull tomoyo updates from Tetsuo Handa:
"Limit recursion depth, fix clang warning, fix comment typo, and
silence memory allocation failure warning"
* tag 'tomoyo-pr-20201214' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1:
tomoyo: Fix typo in comments.
tomoyo: Fix null pointer check
tomoyo: Limit wildcard recursion depth.
tomoyo: fix clang pointer arithmetic warning
tomoyo: Loosen pathname/domainname validation.
Diffstat (limited to 'security/tomoyo/securityfs_if.c')
-rw-r--r-- | security/tomoyo/securityfs_if.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/security/tomoyo/securityfs_if.c b/security/tomoyo/securityfs_if.c index 546281c5b233..065f4941c4d8 100644 --- a/security/tomoyo/securityfs_if.c +++ b/security/tomoyo/securityfs_if.c @@ -131,8 +131,8 @@ static const struct file_operations tomoyo_self_operations = { */ static int tomoyo_open(struct inode *inode, struct file *file) { - const int key = ((u8 *) file_inode(file)->i_private) - - ((u8 *) NULL); + const u8 key = (uintptr_t) file_inode(file)->i_private; + return tomoyo_open_control(key, file); } @@ -223,7 +223,7 @@ static const struct file_operations tomoyo_operations = { static void __init tomoyo_create_entry(const char *name, const umode_t mode, struct dentry *parent, const u8 key) { - securityfs_create_file(name, mode, parent, ((u8 *) NULL) + key, + securityfs_create_file(name, mode, parent, (void *) (uintptr_t) key, &tomoyo_operations); } |