From: Chris Wright <chrisw@osdl.org>
To: akpm@osdl.org, torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/3][LSM] reduce noise during security_register
Date: Thu, 21 Oct 2004 18:04:51 -0700 [thread overview]
Message-ID: <20041021180451.I2357@build.pdx.osdl.net> (raw)
In-Reply-To: <20041021180345.H2357@build.pdx.osdl.net>; from chrisw@osdl.org on Thu, Oct 21, 2004 at 06:03:45PM -0700
Registering a security module can be a noisy operation, esp. when it
retries registration with the primary module. Eliminate some noise, and
distinguish the return values for register_security so a module can tell
the difference between failure modes.
Signed-off-by: Chris Wright <chrisw@osdl.org>
security.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
--- linus-2.6/security/security.c~verbose 2004-10-21 16:50:30.844353688 -0700
+++ linus-2.6/security/security.c 2004-10-21 17:00:54.386560864 -0700
@@ -29,11 +29,8 @@
static inline int verify (struct security_operations *ops)
{
/* verify the security_operations structure exists */
- if (!ops) {
- printk (KERN_INFO "Passed a NULL security_operations "
- "pointer, %s failed.\n", __FUNCTION__);
+ if (!ops)
return -EINVAL;
- }
security_fixup_ops (ops);
return 0;
}
@@ -85,16 +82,13 @@
int register_security (struct security_operations *ops)
{
if (verify (ops)) {
- printk (KERN_INFO "%s could not verify "
+ printk(KERN_DEBUG "%s could not verify "
"security_operations structure.\n", __FUNCTION__);
return -EINVAL;
}
- if (security_ops != &dummy_security_ops) {
- printk (KERN_INFO "There is already a security "
- "framework initialized, %s failed.\n", __FUNCTION__);
- return -EINVAL;
- }
+ if (security_ops != &dummy_security_ops)
+ return -EAGAIN;
security_ops = ops;
next prev parent reply other threads:[~2004-10-22 2:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-22 1:03 [PATCH 1/3][LSM] rename security_scaffolding_startup to security_init Chris Wright
2004-10-22 1:04 ` Chris Wright [this message]
2004-10-22 1:07 ` [PATCH 3/3][LSM] Lindent security/security.c Chris Wright
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=20041021180451.I2357@build.pdx.osdl.net \
--to=chrisw@osdl.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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
all inboxes | Powered by JetHome®