mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
uaccess: fix type mismatch warnings from access_ok()
[ Upstream commit 23fc539e81 ]
On some architectures, access_ok() does not do any argument type
checking, so replacing the definition with a generic one causes
a few warnings for harmless issues that were never caught before.
Fix the ones that I found either through my own test builds or
that were reported by the 0-day bot.
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a49b687a75
commit
40a5c93a74
@@ -589,7 +589,7 @@ do_cache_op(unsigned long start, unsigned long end, int flags)
|
||||
if (end < start || flags)
|
||||
return -EINVAL;
|
||||
|
||||
if (!access_ok(start, end - start))
|
||||
if (!access_ok((void __user *)start, end - start))
|
||||
return -EFAULT;
|
||||
|
||||
return __do_cache_op(start, end);
|
||||
|
||||
Reference in New Issue
Block a user