diff options
author | Carlos Llamas <cmllamas@google.com> | 2021-04-15 23:27:49 +0000 |
---|---|---|
committer | Carlos Llamas <cmllamas@google.com> | 2021-04-16 00:34:51 +0000 |
commit | dc7b23f23cf41f3a52ddc78a95849e5593e1eae7 (patch) | |
tree | 5c3f9608fb60843680552c915fcc91cc717c0479 | |
parent | d83b0684e15113d6053ba2dfdcac903d7038f707 (diff) |
ANDROID: Incremental fs: fix u64 integer cast to pointer
Compiler (arm-linux-gnueabihf-gcc 8.3.0) complains about an invalid cast
of an __aligned_u64 integer to a pointer on 32-bit architectures. Using
u64_to_user_ptr() for the cast fixes the following warning:
fs/incfs/pseudo_files.c: In function ‘ioctl_create_file’:
fs/incfs/pseudo_files.c:656:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
656 | (u8 __user *)args.signature_info,
| ^
Bug: 183339614
Fixes: bc6a70e849cc (ANDROID: Incremental fs: Remove signature checks from kernel)
Reported-by: kernelci.org bot <bot@kernelci.org>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I98a987fb83c160740796c0b4b3fdd7551880e12a
-rw-r--r-- | fs/incfs/pseudo_files.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/incfs/pseudo_files.c b/fs/incfs/pseudo_files.c index 7b0099a079d3..be5e2b91fec6 100644 --- a/fs/incfs/pseudo_files.c +++ b/fs/incfs/pseudo_files.c @@ -653,7 +653,7 @@ static long ioctl_create_file(struct file *file, /* Initializing a newly created file. */ error = init_new_file(mi, index_file_dentry, &args.file_id, args.size, range(attr_value, args.file_attr_len), - (u8 __user *)args.signature_info, + u64_to_user_ptr(args.signature_info), args.signature_size); if (error) goto out; |