LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] apparmor: remove unused argument of aa_umount()
@ 2021-08-31  0:09 Austin Kim
  2021-09-03  3:43 ` Serge E. Hallyn
  2021-09-03 23:30 ` John Johansen
  0 siblings, 2 replies; 4+ messages in thread
From: Austin Kim @ 2021-08-31  0:09 UTC (permalink / raw)
  To: john.johansen, jmorris, serge
  Cc: linux-security-module, linux-kernel, austindh.kim

The 'flags' argument in aa_umount() is not used,
so it had better remove unused argument.

Signed-off-by: Austin Kim <austindh.kim@gmail.com>
---
 security/apparmor/include/mount.h | 2 +-
 security/apparmor/lsm.c           | 2 +-
 security/apparmor/mount.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/security/apparmor/include/mount.h b/security/apparmor/include/mount.h
index a710683b2496..9327456cda09 100644
--- a/security/apparmor/include/mount.h
+++ b/security/apparmor/include/mount.h
@@ -42,7 +42,7 @@ int aa_new_mount(struct aa_label *label, const char *dev_name,
 		 const struct path *path, const char *type, unsigned long flags,
 		 void *data);
 
-int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags);
+int aa_umount(struct aa_label *label, struct vfsmount *mnt);
 
 int aa_pivotroot(struct aa_label *label, const struct path *old_path,
 		 const struct path *new_path);
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
Index 0834ba6a8a2e..58ba3f0605d2 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -574,7 +574,7 @@ static int apparmor_sb_umount(struct vfsmount *mnt, int flags)
 
 	label = __begin_current_label_crit_section();
 	if (!unconfined(label))
-		error = aa_umount(label, mnt, flags);
+		error = aa_umount(label, mnt);
 	__end_current_label_crit_section(label);
 
 	return error;
diff --git a/security/apparmor/mount.c b/security/apparmor/mount.c
index aa6fcfde3051..e33de97839ec 100644
--- a/security/apparmor/mount.c
+++ b/security/apparmor/mount.c
@@ -610,7 +610,7 @@ static int profile_umount(struct aa_profile *profile, const struct path *path,
 			   AA_MAY_UMOUNT, &perms, info, error);
 }
 
-int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags)
+int aa_umount(struct aa_label *label, struct vfsmount *mnt)
 {
 	struct aa_profile *profile;
 	char *buffer = NULL;
-- 
2.20.1


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

* Re: [PATCH] apparmor: remove unused argument of aa_umount()
  2021-08-31  0:09 [PATCH] apparmor: remove unused argument of aa_umount() Austin Kim
@ 2021-09-03  3:43 ` Serge E. Hallyn
  2021-09-03 23:30 ` John Johansen
  1 sibling, 0 replies; 4+ messages in thread
From: Serge E. Hallyn @ 2021-09-03  3:43 UTC (permalink / raw)
  To: Austin Kim
  Cc: john.johansen, jmorris, serge, linux-security-module, linux-kernel

On Tue, Aug 31, 2021 at 01:09:12AM +0100, Austin Kim wrote:
> The 'flags' argument in aa_umount() is not used,
> so it had better remove unused argument.

Seems fine, thanks.

Reviewed-by: Serge Hallyn <serge@hallyn.com>


> Signed-off-by: Austin Kim <austindh.kim@gmail.com>
> ---
>  security/apparmor/include/mount.h | 2 +-
>  security/apparmor/lsm.c           | 2 +-
>  security/apparmor/mount.c         | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/security/apparmor/include/mount.h b/security/apparmor/include/mount.h
> index a710683b2496..9327456cda09 100644
> --- a/security/apparmor/include/mount.h
> +++ b/security/apparmor/include/mount.h
> @@ -42,7 +42,7 @@ int aa_new_mount(struct aa_label *label, const char *dev_name,
>  		 const struct path *path, const char *type, unsigned long flags,
>  		 void *data);
>  
> -int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags);
> +int aa_umount(struct aa_label *label, struct vfsmount *mnt);
>  
>  int aa_pivotroot(struct aa_label *label, const struct path *old_path,
>  		 const struct path *new_path);
> diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> Index 0834ba6a8a2e..58ba3f0605d2 100644
> --- a/security/apparmor/lsm.c
> +++ b/security/apparmor/lsm.c
> @@ -574,7 +574,7 @@ static int apparmor_sb_umount(struct vfsmount *mnt, int flags)
>  
>  	label = __begin_current_label_crit_section();
>  	if (!unconfined(label))
> -		error = aa_umount(label, mnt, flags);
> +		error = aa_umount(label, mnt);
>  	__end_current_label_crit_section(label);
>  
>  	return error;
> diff --git a/security/apparmor/mount.c b/security/apparmor/mount.c
> index aa6fcfde3051..e33de97839ec 100644
> --- a/security/apparmor/mount.c
> +++ b/security/apparmor/mount.c
> @@ -610,7 +610,7 @@ static int profile_umount(struct aa_profile *profile, const struct path *path,
>  			   AA_MAY_UMOUNT, &perms, info, error);
>  }
>  
> -int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags)
> +int aa_umount(struct aa_label *label, struct vfsmount *mnt)
>  {
>  	struct aa_profile *profile;
>  	char *buffer = NULL;
> -- 
> 2.20.1

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

* Re: [PATCH] apparmor: remove unused argument of aa_umount()
  2021-08-31  0:09 [PATCH] apparmor: remove unused argument of aa_umount() Austin Kim
  2021-09-03  3:43 ` Serge E. Hallyn
@ 2021-09-03 23:30 ` John Johansen
  2021-09-04  2:27   ` Austin Kim
  1 sibling, 1 reply; 4+ messages in thread
From: John Johansen @ 2021-09-03 23:30 UTC (permalink / raw)
  To: Austin Kim, jmorris, serge; +Cc: linux-security-module, linux-kernel

On 8/30/21 5:09 PM, Austin Kim wrote:
> The 'flags' argument in aa_umount() is not used,
> so it had better remove unused argument.
> 
> Signed-off-by: Austin Kim <austindh.kim@gmail.com>

looks good, I'll pull this into my tree

Acked-by: John Johansen <john.johansen@canonical.com>

> ---
>  security/apparmor/include/mount.h | 2 +-
>  security/apparmor/lsm.c           | 2 +-
>  security/apparmor/mount.c         | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/security/apparmor/include/mount.h b/security/apparmor/include/mount.h
> index a710683b2496..9327456cda09 100644
> --- a/security/apparmor/include/mount.h
> +++ b/security/apparmor/include/mount.h
> @@ -42,7 +42,7 @@ int aa_new_mount(struct aa_label *label, const char *dev_name,
>  		 const struct path *path, const char *type, unsigned long flags,
>  		 void *data);
>  
> -int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags);
> +int aa_umount(struct aa_label *label, struct vfsmount *mnt);
>  
>  int aa_pivotroot(struct aa_label *label, const struct path *old_path,
>  		 const struct path *new_path);
> diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> Index 0834ba6a8a2e..58ba3f0605d2 100644
> --- a/security/apparmor/lsm.c
> +++ b/security/apparmor/lsm.c
> @@ -574,7 +574,7 @@ static int apparmor_sb_umount(struct vfsmount *mnt, int flags)
>  
>  	label = __begin_current_label_crit_section();
>  	if (!unconfined(label))
> -		error = aa_umount(label, mnt, flags);
> +		error = aa_umount(label, mnt);
>  	__end_current_label_crit_section(label);
>  
>  	return error;
> diff --git a/security/apparmor/mount.c b/security/apparmor/mount.c
> index aa6fcfde3051..e33de97839ec 100644
> --- a/security/apparmor/mount.c
> +++ b/security/apparmor/mount.c
> @@ -610,7 +610,7 @@ static int profile_umount(struct aa_profile *profile, const struct path *path,
>  			   AA_MAY_UMOUNT, &perms, info, error);
>  }
>  
> -int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags)
> +int aa_umount(struct aa_label *label, struct vfsmount *mnt)
>  {
>  	struct aa_profile *profile;
>  	char *buffer = NULL;
> 


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

* Re: [PATCH] apparmor: remove unused argument of aa_umount()
  2021-09-03 23:30 ` John Johansen
@ 2021-09-04  2:27   ` Austin Kim
  0 siblings, 0 replies; 4+ messages in thread
From: Austin Kim @ 2021-09-04  2:27 UTC (permalink / raw)
  To: John Johansen
  Cc: James Morris, Serge E. Hallyn, linux-security-module,
	Linux Kernel Mailing List

2021년 9월 4일 (토) 오전 8:30, John Johansen <john.johansen@canonical.com>님이 작성:
>
> On 8/30/21 5:09 PM, Austin Kim wrote:
> > The 'flags' argument in aa_umount() is not used,
> > so it had better remove unused argument.
> >
> > Signed-off-by: Austin Kim <austindh.kim@gmail.com>
>
> looks good, I'll pull this into my tree

Great, thanks!

>
> Acked-by: John Johansen <john.johansen@canonical.com>
>
> > ---
> >  security/apparmor/include/mount.h | 2 +-
> >  security/apparmor/lsm.c           | 2 +-
> >  security/apparmor/mount.c         | 2 +-
> >  3 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/security/apparmor/include/mount.h b/security/apparmor/include/mount.h
> > index a710683b2496..9327456cda09 100644
> > --- a/security/apparmor/include/mount.h
> > +++ b/security/apparmor/include/mount.h
> > @@ -42,7 +42,7 @@ int aa_new_mount(struct aa_label *label, const char *dev_name,
> >                const struct path *path, const char *type, unsigned long flags,
> >                void *data);
> >
> > -int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags);
> > +int aa_umount(struct aa_label *label, struct vfsmount *mnt);
> >
> >  int aa_pivotroot(struct aa_label *label, const struct path *old_path,
> >                const struct path *new_path);
> > diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> > Index 0834ba6a8a2e..58ba3f0605d2 100644
> > --- a/security/apparmor/lsm.c
> > +++ b/security/apparmor/lsm.c
> > @@ -574,7 +574,7 @@ static int apparmor_sb_umount(struct vfsmount *mnt, int flags)
> >
> >       label = __begin_current_label_crit_section();
> >       if (!unconfined(label))
> > -             error = aa_umount(label, mnt, flags);
> > +             error = aa_umount(label, mnt);
> >       __end_current_label_crit_section(label);
> >
> >       return error;
> > diff --git a/security/apparmor/mount.c b/security/apparmor/mount.c
> > index aa6fcfde3051..e33de97839ec 100644
> > --- a/security/apparmor/mount.c
> > +++ b/security/apparmor/mount.c
> > @@ -610,7 +610,7 @@ static int profile_umount(struct aa_profile *profile, const struct path *path,
> >                          AA_MAY_UMOUNT, &perms, info, error);
> >  }
> >
> > -int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags)
> > +int aa_umount(struct aa_label *label, struct vfsmount *mnt)
> >  {
> >       struct aa_profile *profile;
> >       char *buffer = NULL;
> >
>

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

end of thread, other threads:[~2021-09-04  2:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31  0:09 [PATCH] apparmor: remove unused argument of aa_umount() Austin Kim
2021-09-03  3:43 ` Serge E. Hallyn
2021-09-03 23:30 ` John Johansen
2021-09-04  2:27   ` Austin Kim

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