[lkml]   [2001]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.4.15-final drivers/net/bonding.c includes user space headers
On 25 Nov 2001 13:49:33 -0800, 
"H. Peter Anvin" <> wrote:
>By author: Keith Owens <>
>> 2.4.15-final/drivers/net/bonding.c:188: #include <limits.h>
>> Kernel code must not include use space headers. I thought this had
>> been fixed. It will not compile in 2.5.
><limits.h> is one of the compiler-provided headers, i.e. from
>/usr/lib/gcc-lib/*/*/include -- if your kbuild harness don't
>allow those headers to be included, it's broken.

kbuild 2.5 does
'-nostdinc -I/usr/lib/gcc-lib/... gcc version ../include/'
so it allows includes from the compiler headers. The problem is:

bonding.c includes limits.h, picked up from gcc, OK.
limits.h includes syslimits.h from gcc, OK.
syslimits.h tries to include_next <limits.h> to get the user space
limits, not OK.

Any kernel code that includes limits.h or syslimits.h is polluted by
user space headers. net/bonding.c does not even need limits.h.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:18    [W:0.110 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site