2013-04-04 01:17:24

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] audit: remove duplicated include from audit.c

From: Wei Yongjun <[email protected]>

Remove duplicated include.

Signed-off-by: Wei Yongjun <[email protected]>
---
kernel/audit.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index 488f85f..9377913 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -58,7 +58,6 @@
#ifdef CONFIG_SECURITY
#include <linux/security.h>
#endif
-#include <net/netlink.h>
#include <linux/freezer.h>
#include <linux/tty.h>
#include <linux/pid_namespace.h>


2013-04-10 17:26:14

by Eric Paris

[permalink] [raw]
Subject: Re: [PATCH -next] audit: remove duplicated include from audit.c

net/netlink.h includes linux/netlink.h but linux/netlink.h does not include net/netlink.h

since the audit code uses the nlmsg_* functions provided in net/netlink.h it seems we need this include.

since the audit code uses netlink_unicast provided in linux/netlink.h it seems we need that include.

I don't see duplication even if by chance one of them would have included the other...

----- Original Message -----
> From: Wei Yongjun <[email protected]>
>
> Remove duplicated include.
>
> Signed-off-by: Wei Yongjun <[email protected]>
> ---
> kernel/audit.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/kernel/audit.c b/kernel/audit.c
> index 488f85f..9377913 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -58,7 +58,6 @@
> #ifdef CONFIG_SECURITY
> #include <linux/security.h>
> #endif
> -#include <net/netlink.h>
> #include <linux/freezer.h>
> #include <linux/tty.h>
> #include <linux/pid_namespace.h>
>
>

2013-04-12 03:54:43

by [email protected]

[permalink] [raw]
Subject: RE: [PATCH -next] audit: remove duplicated include from audit.c

Hi Eric,

Sorry reply on top.

>From the source code from linex-next.git tree, line 55~64:

#include <net/sock.h>
#include <net/netlink.h> *******
#include <linux/skbuff.h>
#ifdef CONFIG_SECURITY
#include <linux/security.h>
#endif
#include <net/netlink.h> *******
#include <linux/freezer.h>
#include <linux/tty.h>
#include <linux/pid_namespace.h>

net/netlink.h is included twice, and linux/netlink.h is not included by this file.

-----Original Message-----
From: Eric Paris [mailto:[email protected]]
Sent: 2013年4月11日 1:26
To: Wei Yongjun
Cc: [email protected]; Yongjun Wei (RD-CN); [email protected]
Subject: Re: [PATCH -next] audit: remove duplicated include from audit.c

net/netlink.h includes linux/netlink.h but linux/netlink.h does not include net/netlink.h

since the audit code uses the nlmsg_* functions provided in net/netlink.h it seems we need this include.

since the audit code uses netlink_unicast provided in linux/netlink.h it seems we need that include.

I don't see duplication even if by chance one of them would have included the other...

----- Original Message -----
> From: Wei Yongjun <[email protected]>
>
> Remove duplicated include.
>
> Signed-off-by: Wei Yongjun <[email protected]>
> ---
> kernel/audit.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/kernel/audit.c b/kernel/audit.c index 488f85f..9377913
> 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -58,7 +58,6 @@
> #ifdef CONFIG_SECURITY
> #include <linux/security.h>
> #endif
> -#include <net/netlink.h>
> #include <linux/freezer.h>
> #include <linux/tty.h>
> #include <linux/pid_namespace.h>
>
>

<table class="TM_EMAIL_NOTICE"><tr><td><pre>
TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential
and may be subject to copyright or other intellectual property protection.
If you are not the intended recipient, you are not authorized to use or
disclose this information, and we request that you notify us by reply mail or
telephone and delete the original message from your mail system.
</pre></td></tr></table>????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2013-04-12 13:32:52

by Eric Paris

[permalink] [raw]
Subject: Re: [PATCH -next] audit: remove duplicated include from audit.c

Came in via the net-next tree from commit 941912133025926307c7a65b203fa38403b1063a

I'll ping dmiller and friends.

----- Original Message -----
> Hi Eric,
>
> Sorry reply on top.
>
> From the source code from linex-next.git tree, line 55~64:
>
> #include <net/sock.h>
> #include <net/netlink.h> *******
> #include <linux/skbuff.h>
> #ifdef CONFIG_SECURITY
> #include <linux/security.h>
> #endif
> #include <net/netlink.h> *******
> #include <linux/freezer.h>
> #include <linux/tty.h>
> #include <linux/pid_namespace.h>
>
> net/netlink.h is included twice, and linux/netlink.h is not included by this
> file.
>
> -----Original Message-----
> From: Eric Paris [mailto:[email protected]]
> Sent: 2013年4月11日 1:26
> To: Wei Yongjun
> Cc: [email protected]; Yongjun Wei (RD-CN);
> [email protected]
> Subject: Re: [PATCH -next] audit: remove duplicated include from audit.c
>
> net/netlink.h includes linux/netlink.h but linux/netlink.h does not include
> net/netlink.h
>
> since the audit code uses the nlmsg_* functions provided in net/netlink.h it
> seems we need this include.
>
> since the audit code uses netlink_unicast provided in linux/netlink.h it
> seems we need that include.
>
> I don't see duplication even if by chance one of them would have included the
> other...
>
> ----- Original Message -----
> > From: Wei Yongjun <[email protected]>
> >
> > Remove duplicated include.
> >
> > Signed-off-by: Wei Yongjun <[email protected]>
> > ---
> > kernel/audit.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/kernel/audit.c b/kernel/audit.c index 488f85f..9377913
> > 100644
> > --- a/kernel/audit.c
> > +++ b/kernel/audit.c
> > @@ -58,7 +58,6 @@
> > #ifdef CONFIG_SECURITY
> > #include <linux/security.h>
> > #endif
> > -#include <net/netlink.h>
> > #include <linux/freezer.h>
> > #include <linux/tty.h>
> > #include <linux/pid_namespace.h>
> >
> >
>
> <table class="TM_EMAIL_NOTICE"><tr><td><pre>
> TREND MICRO EMAIL NOTICE
> The information contained in this email and any attachments is confidential
> and may be subject to copyright or other intellectual property protection.
> If you are not the intended recipient, you are not authorized to use or
> disclose this information, and we request that you notify us by reply mail or
> telephone and delete the original message from your mail system.
> </pre></td></tr></table>