From: Arnd Bergmann <arnd@arndb.de>
To: Lubos Lunak <l.lunak@suse.cz>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] do not export kernel's NULL #define to userspace
Date: Wed, 21 Mar 2012 14:17:14 +0000 [thread overview]
Message-ID: <201203211417.14306.arnd@arndb.de> (raw)
In-Reply-To: <201203211509.27977.l.lunak@suse.cz>
On Wednesday 21 March 2012, Lubos Lunak wrote:
> > If so, we might have to replace it with a __KERNEL_NULL constant
> > or something, like we do for the stuff in linux/types.h, so we
> > don't accidentally break user applications that rely on the
> > header files to be self-contained.
> >
> > I think there is at least a NULL usage in linux/wireless.h and some
> > netfilter headers.
>
> I see. How about the attached patch then?
Strictly speaking, you should not include standard headers from kernel
provided headers, and the problems would be similar to those before
your patch: anyone who currently doesn't include <stddef.h> but has
their own definition of NULL will still get a conflict from including
a kernel header that includes <linux/stddef.h>.
Arnd
next prev parent reply other threads:[~2012-03-21 14:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 13:08 [PATCH] do not export kernel's NULL #define to userspace Lubos Lunak
2012-03-21 13:32 ` Arnd Bergmann
2012-03-21 14:09 ` Lubos Lunak
2012-03-21 14:17 ` Arnd Bergmann [this message]
2012-03-21 18:37 ` Lubos Lunak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201203211417.14306.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=l.lunak@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox