linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: John Johansen <john.johansen@canonical.com>,
	Paul Moore <paul@paul-moore.com>,
	James Morris <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Georgia Garcia <georgia.garcia@canonical.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Khadija Kamran <kamrankhadijadj@gmail.com>,
	Casey Schaufler <casey@schaufler-ca.com>,
	Christian Brauner <brauner@kernel.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] apparmor: mark new functions static
Date: Fri, 20 Oct 2023 15:12:57 +0200	[thread overview]
Message-ID: <20231020131303.785906-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

Two new functions were introduced as global functions when they are
only called from inside the file that defines them and should have
been static:

security/apparmor/lsm.c:658:5: error: no previous prototype for 'apparmor_uring_override_creds' [-Werror=missing-prototypes]
security/apparmor/lsm.c:682:5: error: no previous prototype for 'apparmor_uring_sqpoll' [-Werror=missing-prototypes]

Fixes: c4371d90633b7 ("apparmor: add io_uring mediation")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 security/apparmor/lsm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 91ff91cf1aaef..4981bdf029931 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -655,7 +655,7 @@ static int profile_uring(struct aa_profile *profile, u32 request,
  * Check to see if the current task is allowed to override it's credentials
  * to service an io_uring operation.
  */
-int apparmor_uring_override_creds(const struct cred *new)
+static int apparmor_uring_override_creds(const struct cred *new)
 {
 	struct aa_profile *profile;
 	struct aa_label *label;
@@ -679,7 +679,7 @@ int apparmor_uring_override_creds(const struct cred *new)
  * Check to see if the current task is allowed to create a new io_uring
  * kernel polling thread.
  */
-int apparmor_uring_sqpoll(void)
+static int apparmor_uring_sqpoll(void)
 {
 	struct aa_profile *profile;
 	struct aa_label *label;
-- 
2.39.2


             reply	other threads:[~2023-10-20 13:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20 13:12 Arnd Bergmann [this message]
2023-10-22  7:46 ` [PATCH] apparmor: mark new functions static John Johansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231020131303.785906-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=apparmor@lists.ubuntu.com \
    --cc=arnd@arndb.de \
    --cc=brauner@kernel.org \
    --cc=casey@schaufler-ca.com \
    --cc=georgia.garcia@canonical.com \
    --cc=jmorris@namei.org \
    --cc=john.johansen@canonical.com \
    --cc=kamrankhadijadj@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=paul@paul-moore.com \
    --cc=serge@hallyn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).