mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 08:28:13 +00:00
08ee3a009f
Added __get/__put_kernel_nofault as preparation for removing get/set_fs. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Reviewed-by: Christoph Hellwig <hch@lst.de>
10 lines
275 B
C
10 lines
275 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
#include <linux/uaccess.h>
|
|
#include <linux/kernel.h>
|
|
|
|
bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
|
|
{
|
|
/* highest bit set means kernel space */
|
|
return (unsigned long)unsafe_src >> (BITS_PER_LONG - 1);
|
|
}
|