* linux-4.14-rc1/arch/x86/include/asm/uaccess.h: Missing include of <linux/sched.h>
@ 2017-09-19 12:21 Stefan Mätje
2017-09-19 13:12 ` Seraphime Kirkovski
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Mätje @ 2017-09-19 12:21 UTC (permalink / raw)
To: linux-kernel
Resend with changed subject:
Hi,
there is a change in Linus' mainline kernel for 4.14-rc1
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/x86/include/asm/uaccess.h?id=6c51e67b64d169419fb13318035bb442f9176612)
that changes the set_fs() macro into an inline function.
This breaks the build of an out of kernel driver I maintain with this
message:
./arch/x86/include/asm/uaccess.h: In function ‘set_fs’:
./arch/x86/include/asm/uaccess.h:31:9: error: dereferencing pointer to
incomplete type
set_fs() is referencing the "current" pointer which is of type "struct
task_struct" declared in include/linux/sched.h.
Before the change set_fs() was a macro. Because I don't use it it was of
no concern for me. But now the compiler needs to compile the inline
function set_fs() and fails.
Should I add the needed <linux/sched.h> myself in my code or will that
be changed / fixed in the <asm/uaccess.h> header by including the
missing header.
Thanks for any advice.
Best regards,
Stefan Mätje
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-4.14-rc1/arch/x86/include/asm/uaccess.h: Missing include of <linux/sched.h>
2017-09-19 12:21 linux-4.14-rc1/arch/x86/include/asm/uaccess.h: Missing include of <linux/sched.h> Stefan Mätje
@ 2017-09-19 13:12 ` Seraphime Kirkovski
2017-09-19 13:57 ` Stefan Mätje
0 siblings, 1 reply; 3+ messages in thread
From: Seraphime Kirkovski @ 2017-09-19 13:12 UTC (permalink / raw)
To: Stefan Mätje; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: linux-4.14-rc1/arch/x86/include/asm/uaccess.h: Missing include of <linux/sched.h>
2017-09-19 13:12 ` Seraphime Kirkovski
@ 2017-09-19 13:57 ` Stefan Mätje
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Mätje @ 2017-09-19 13:57 UTC (permalink / raw)
To: Seraphime Kirkovski; +Cc: linux-kernel
Hi,
changing the include line to <linux/uaccess.h> solves the problem for me.
Thank you for taking the time to look into this.
Best regards,
Stefan Mätje
Am 19.09.2017 um 15:12 schrieb Seraphime Kirkovski:
> 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>
My code doesn't use set_fs() but it is only in the header.
> 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>
I did miss this deprecation.
> Thanks,
> Seraphime Kirkovski
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-19 13:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-19 12:21 linux-4.14-rc1/arch/x86/include/asm/uaccess.h: Missing include of <linux/sched.h> Stefan Mätje
2017-09-19 13:12 ` Seraphime Kirkovski
2017-09-19 13:57 ` Stefan Mätje
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®