linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selinux: fix typo in selinux_netlbl_sctp_sk_clone declaration
@ 2018-02-23 21:12 Arnd Bergmann
  2018-02-23 21:25 ` Paul Moore
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2018-02-23 21:12 UTC (permalink / raw)
  To: Paul Moore
  Cc: Arnd Bergmann, Stephen Smalley, Eric Paris, James Morris,
	Serge E. Hallyn, Martin Kepplinger, Richard Haines, selinux,
	linux-security-module, linux-kernel

A missing 'struct' keyword caused a build error when CONFIG_NETLABEL
is disabled:

In file included from security/selinux/hooks.c:99:
security/selinux/include/netlabel.h:135:66: error: unknown type name 'sock'
 static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk, sock *newsk)
                                                                  ^~~~
security/selinux/hooks.c: In function 'selinux_sctp_sk_clone':
security/selinux/hooks.c:5188:2: error: implicit declaration of function 'selinux_netlbl_sctp_sk_clone'; did you mean 'selinux_netlbl_inet_csk_clone'? [-Werror=implicit-function-declaration]

Fixes: db97c9f9d312 ("selinux: Add SCTP support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 security/selinux/include/netlabel.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/security/selinux/include/netlabel.h b/security/selinux/include/netlabel.h
index 6ef4953431dc..8671de09c363 100644
--- a/security/selinux/include/netlabel.h
+++ b/security/selinux/include/netlabel.h
@@ -132,7 +132,8 @@ static inline void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family)
 {
 	return;
 }
-static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk, sock *newsk)
+static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk,
+						struct sock *newsk)
 {
 	return;
 }
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] selinux: fix typo in selinux_netlbl_sctp_sk_clone declaration
  2018-02-23 21:12 [PATCH] selinux: fix typo in selinux_netlbl_sctp_sk_clone declaration Arnd Bergmann
@ 2018-02-23 21:25 ` Paul Moore
  2018-02-24 10:29   ` Richard Haines
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Moore @ 2018-02-23 21:25 UTC (permalink / raw)
  To: Arnd Bergmann, Richard Haines
  Cc: Stephen Smalley, Eric Paris, James Morris, Serge E. Hallyn,
	Martin Kepplinger, selinux, linux-security-module, linux-kernel

On Fri, Feb 23, 2018 at 4:12 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> A missing 'struct' keyword caused a build error when CONFIG_NETLABEL
> is disabled:
>
> In file included from security/selinux/hooks.c:99:
> security/selinux/include/netlabel.h:135:66: error: unknown type name 'sock'
>  static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk, sock *newsk)
>                                                                   ^~~~
> security/selinux/hooks.c: In function 'selinux_sctp_sk_clone':
> security/selinux/hooks.c:5188:2: error: implicit declaration of function 'selinux_netlbl_sctp_sk_clone'; did you mean 'selinux_netlbl_inet_csk_clone'? [-Werror=implicit-function-declaration]
>
> Fixes: db97c9f9d312 ("selinux: Add SCTP support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  security/selinux/include/netlabel.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Thanks, merged and pushed to selinux/next.

Richard was going to submit a patch for that, but I don't think he
would mind you beating him :)

> diff --git a/security/selinux/include/netlabel.h b/security/selinux/include/netlabel.h
> index 6ef4953431dc..8671de09c363 100644
> --- a/security/selinux/include/netlabel.h
> +++ b/security/selinux/include/netlabel.h
> @@ -132,7 +132,8 @@ static inline void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family)
>  {
>         return;
>  }
> -static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk, sock *newsk)
> +static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk,
> +                                               struct sock *newsk)
>  {
>         return;
>  }
> --
> 2.9.0
>

-- 
paul moore
www.paul-moore.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] selinux: fix typo in selinux_netlbl_sctp_sk_clone declaration
  2018-02-23 21:25 ` Paul Moore
@ 2018-02-24 10:29   ` Richard Haines
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Haines @ 2018-02-24 10:29 UTC (permalink / raw)
  To: Paul Moore, Arnd Bergmann, nhorman, marcelo.leitner
  Cc: Stephen Smalley, Eric Paris, James Morris, Serge E. Hallyn,
	Martin Kepplinger, selinux, linux-security-module, linux-kernel

On Fri, 2018-02-23 at 16:25 -0500, Paul Moore wrote:
> On Fri, Feb 23, 2018 at 4:12 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > A missing 'struct' keyword caused a build error when
> > CONFIG_NETLABEL
> > is disabled:
> > 
> > In file included from security/selinux/hooks.c:99:
> > security/selinux/include/netlabel.h:135:66: error: unknown type
> > name 'sock'
> >  static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk,
> > sock *newsk)
> >                                                                   ^
> > ~~~
> > security/selinux/hooks.c: In function 'selinux_sctp_sk_clone':
> > security/selinux/hooks.c:5188:2: error: implicit declaration of
> > function 'selinux_netlbl_sctp_sk_clone'; did you mean
> > 'selinux_netlbl_inet_csk_clone'? [-Werror=implicit-function-
> > declaration]
> > 
> > Fixes: db97c9f9d312 ("selinux: Add SCTP support")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> >  security/selinux/include/netlabel.h | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> Thanks, merged and pushed to selinux/next.
> 
> Richard was going to submit a patch for that, but I don't think he
> would mind you beating him :)

Don't mind at all. What I will do then is fix the problem highlighted
by [1] that affects "[PATCH V7 2/4] sctp: Add ip option support", I'll
issue a V8 asap.

[1] https://lists.01.org/pipermail/kbuild-all/2018-February/043695.html

> 
> > diff --git a/security/selinux/include/netlabel.h
> > b/security/selinux/include/netlabel.h
> > index 6ef4953431dc..8671de09c363 100644
> > --- a/security/selinux/include/netlabel.h
> > +++ b/security/selinux/include/netlabel.h
> > @@ -132,7 +132,8 @@ static inline void
> > selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family)
> >  {
> >         return;
> >  }
> > -static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk,
> > sock *newsk)
> > +static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk,
> > +                                               struct sock *newsk)
> >  {
> >         return;
> >  }
> > --
> > 2.9.0
> > 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-24 10:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-23 21:12 [PATCH] selinux: fix typo in selinux_netlbl_sctp_sk_clone declaration Arnd Bergmann
2018-02-23 21:25 ` Paul Moore
2018-02-24 10:29   ` Richard Haines

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).