diff mbox series

netlink: Remove the include of files doesn't exist

Message ID 20240405141907.166334-1-richard120310@gmail.com (mailing list archive)
State Rejected
Delegated to: Paul Moore
Headers show
Series netlink: Remove the include of files doesn't exist | expand

Commit Message

I Hsin Cheng April 5, 2024, 2:19 p.m. UTC
The file for /security/selinux/security.h and the file for
/include/linux/selinux_netlink.h are no long exist. However the
preprocessor still performs the inclusion of those files, these
behaviors should be removed to ensure it's bug-free.

Signed-off-by: I Hsin Cheng <richard120310@gmail.com>
---
 security/selinux/netlink.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Stephen Smalley April 5, 2024, 4:03 p.m. UTC | #1
On Fri, Apr 5, 2024 at 10:19 AM I Hsin Cheng <richard120310@gmail.com> wrote:
>
> The file for /security/selinux/security.h and the file for
> /include/linux/selinux_netlink.h are no long exist. However the
> preprocessor still performs the inclusion of those files, these
> behaviors should be removed to ensure it's bug-free.
>
> Signed-off-by: I Hsin Cheng <richard120310@gmail.com>

NAK. You are incorrect on both counts and evidently didn't try compiling.
At a purely source level, I agree it might look confusing, but the
Makefile adds the security/selinux/include directory (where security.h
lives) to the include path and selinux_netlink.h lives under
include/uapi/linux which is auto-magically included.

> ---
>  security/selinux/netlink.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/security/selinux/netlink.c b/security/selinux/netlink.c
> index 1760aee71..8ce36abaa 100644
> --- a/security/selinux/netlink.c
> +++ b/security/selinux/netlink.c
> @@ -13,11 +13,9 @@
>  #include <linux/kernel.h>
>  #include <linux/export.h>
>  #include <linux/skbuff.h>
> -#include <linux/selinux_netlink.h>
>  #include <net/net_namespace.h>
>  #include <net/netlink.h>
>
> -#include "security.h"
>
>  static struct sock *selnl __ro_after_init;
>
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/security/selinux/netlink.c b/security/selinux/netlink.c
index 1760aee71..8ce36abaa 100644
--- a/security/selinux/netlink.c
+++ b/security/selinux/netlink.c
@@ -13,11 +13,9 @@ 
 #include <linux/kernel.h>
 #include <linux/export.h>
 #include <linux/skbuff.h>
-#include <linux/selinux_netlink.h>
 #include <net/net_namespace.h>
 #include <net/netlink.h>
 
-#include "security.h"
 
 static struct sock *selnl __ro_after_init;