Re: linux-4.14-rc1/arch/x86/include/asm/uaccess.h: Missing include of <linux/sched.h>

From: Seraphime Kirkovski
Date: Tue Sep 19 2017 - 09:12:46 EST


Hi,

> ./arch/x86/include/asm/uaccess.h: In function âset_fsâ:
> ./arch/x86/include/asm/uaccess.h:31:9: error: dereferencing pointer to
> incomplete type

I can reproduce your problem by including <asm/uaccess.h>, but not with
<linux/uaccess.h>.

#include <asm/uaccess.h>
//#include <linux/uaccess.h> does compile
#include <linux/module.h>


int __init init(void)
{
set_fs(get_fs());
return 0;
}

void __exit finit(void)
{
}

module_init(init);
module_exit(finit);

If my memory is any good, direct inclusion of <asm/uaccess.h> was
deprecated in 4.12 and new code should use <linux/uaccess.h>

Thanks,
Seraphime Kirkovski