linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] selinux: Make selinux_kernfs_init_security static
@ 2019-03-22 14:04 Yue Haibing
  2019-03-22 17:45 ` Ondrej Mosnacek
  2019-03-27 15:19 ` Mukesh Ojha
  0 siblings, 2 replies; 4+ messages in thread
From: Yue Haibing @ 2019-03-22 14:04 UTC (permalink / raw)
  To: paul, sds, eparis; +Cc: linux-kernel, selinux, YueHaibing

From: YueHaibing <yuehaibing@huawei.com>

Fix sparse warning:

security/selinux/hooks.c:3389:5: warning:
 symbol 'selinux_kernfs_init_security' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 security/selinux/hooks.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index ab4b049..b6e6152 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -3386,8 +3386,8 @@ static int selinux_inode_copy_up_xattr(const char *name)
 
 /* kernfs node operations */
 
-int selinux_kernfs_init_security(struct kernfs_node *kn_dir,
-				 struct kernfs_node *kn)
+static int selinux_kernfs_init_security(struct kernfs_node *kn_dir,
+					struct kernfs_node *kn)
 {
 	const struct task_security_struct *tsec = current_security();
 	u32 parent_sid, newsid, clen;
-- 
2.7.0



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

* Re: [PATCH -next] selinux: Make selinux_kernfs_init_security static
  2019-03-22 14:04 [PATCH -next] selinux: Make selinux_kernfs_init_security static Yue Haibing
@ 2019-03-22 17:45 ` Ondrej Mosnacek
  2019-03-22 20:02   ` Paul Moore
  2019-03-27 15:19 ` Mukesh Ojha
  1 sibling, 1 reply; 4+ messages in thread
From: Ondrej Mosnacek @ 2019-03-22 17:45 UTC (permalink / raw)
  To: Yue Haibing
  Cc: Paul Moore, Stephen Smalley, Eric Paris,
	Linux kernel mailing list, selinux

On Fri, Mar 22, 2019 at 3:04 PM Yue Haibing <yuehaibing@huawei.com> wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> Fix sparse warning:
>
> security/selinux/hooks.c:3389:5: warning:
>  symbol 'selinux_kernfs_init_security' was not declared. Should it be static?
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Yup, another trivial mistake on my part...

Acked-by: Ondrej Mosnacek <omosnace@redhat.com>

Thanks for catching that!

> ---
>  security/selinux/hooks.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index ab4b049..b6e6152 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -3386,8 +3386,8 @@ static int selinux_inode_copy_up_xattr(const char *name)
>
>  /* kernfs node operations */
>
> -int selinux_kernfs_init_security(struct kernfs_node *kn_dir,
> -                                struct kernfs_node *kn)
> +static int selinux_kernfs_init_security(struct kernfs_node *kn_dir,
> +                                       struct kernfs_node *kn)
>  {
>         const struct task_security_struct *tsec = current_security();
>         u32 parent_sid, newsid, clen;
> --
> 2.7.0

-- 
Ondrej Mosnacek <omosnace at redhat dot com>
Software Engineer, Security Technologies
Red Hat, Inc.

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

* Re: [PATCH -next] selinux: Make selinux_kernfs_init_security static
  2019-03-22 17:45 ` Ondrej Mosnacek
@ 2019-03-22 20:02   ` Paul Moore
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Moore @ 2019-03-22 20:02 UTC (permalink / raw)
  To: Yue Haibing
  Cc: Stephen Smalley, Eric Paris, Linux kernel mailing list, selinux,
	Ondrej Mosnacek

On Fri, Mar 22, 2019 at 1:46 PM Ondrej Mosnacek <omosnace@redhat.com> wrote:
> On Fri, Mar 22, 2019 at 3:04 PM Yue Haibing <yuehaibing@huawei.com> wrote:
> > From: YueHaibing <yuehaibing@huawei.com>
> >
> > Fix sparse warning:
> >
> > security/selinux/hooks.c:3389:5: warning:
> >  symbol 'selinux_kernfs_init_security' was not declared. Should it be static?
> >
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>
> Yup, another trivial mistake on my part...
>
> Acked-by: Ondrej Mosnacek <omosnace@redhat.com>
>
> Thanks for catching that!

Yes, thanks for the patch; I don't always check for static (or
const'ified args) as much as I should when reviewing code.  Merged
into selinux/next.

-- 
paul moore
www.paul-moore.com

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

* Re: [PATCH -next] selinux: Make selinux_kernfs_init_security static
  2019-03-22 14:04 [PATCH -next] selinux: Make selinux_kernfs_init_security static Yue Haibing
  2019-03-22 17:45 ` Ondrej Mosnacek
@ 2019-03-27 15:19 ` Mukesh Ojha
  1 sibling, 0 replies; 4+ messages in thread
From: Mukesh Ojha @ 2019-03-27 15:19 UTC (permalink / raw)
  To: Yue Haibing, paul, sds, eparis; +Cc: linux-kernel, selinux


On 3/22/2019 7:34 PM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> Fix sparse warning:
>
> security/selinux/hooks.c:3389:5: warning:
>   symbol 'selinux_kernfs_init_security' was not declared. Should it be static?
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

-Mukesh
> ---
>   security/selinux/hooks.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index ab4b049..b6e6152 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -3386,8 +3386,8 @@ static int selinux_inode_copy_up_xattr(const char *name)
>   
>   /* kernfs node operations */
>   
> -int selinux_kernfs_init_security(struct kernfs_node *kn_dir,
> -				 struct kernfs_node *kn)
> +static int selinux_kernfs_init_security(struct kernfs_node *kn_dir,
> +					struct kernfs_node *kn)
>   {
>   	const struct task_security_struct *tsec = current_security();
>   	u32 parent_sid, newsid, clen;

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

end of thread, other threads:[~2019-03-27 15:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22 14:04 [PATCH -next] selinux: Make selinux_kernfs_init_security static Yue Haibing
2019-03-22 17:45 ` Ondrej Mosnacek
2019-03-22 20:02   ` Paul Moore
2019-03-27 15:19 ` Mukesh Ojha

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).