From: serue@us.ibm.com
To: James Morris <jmorris@namei.org>
Cc: serue@us.ibm.com, Andrew Morton <akpm@osdl.org>,
lkml <linux-kernel@vger.kernel.org>,
Michael Halcrow <mhalcrow@us.ibm.com>
Subject: Re: [PATCH] seclvl: use securityfs
Date: Tue, 9 Aug 2005 08:44:24 -0500 [thread overview]
Message-ID: <20050809134424.GB2590@serge.austin.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.63.0508090107190.20178@excalibur.intercode>
Quoting James Morris (jmorris@namei.org):
> On Mon, 8 Aug 2005, serue@us.ibm.com wrote:
>
> This looks like a nice cleanup.
>
> > +
> > + if (count < 0 || count >= PAGE_SIZE)
> > + return -ENOMEM;
> > + if (*ppos != 0) {
> > + return -EINVAL;
> > + }
>
> Why is the first error there -ENOMEM and not -EINVAL?
Thanks James, that should be -EINVAL for both. For that matter, the
braces in the next line shouldn't be there. Obvious patch appended.
thanks,
-serge
Signed-off-by: Serge Hallyn <serue@us.ibm.com>
--
seclvl.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
Index: linux-2.6.13-rc5-mm1/security/seclvl.c
===================================================================
--- linux-2.6.13-rc5-mm1.orig/security/seclvl.c 2005-08-08 17:22:45.000000000 -0500
+++ linux-2.6.13-rc5-mm1/security/seclvl.c 2005-08-09 13:45:31.000000000 -0500
@@ -252,10 +252,9 @@ passwd_write_file(struct file * file, co
}
if (count < 0 || count >= PAGE_SIZE)
- return -ENOMEM;
- if (*ppos != 0) {
return -EINVAL;
- }
+ if (*ppos != 0)
+ return -EINVAL;
page = (char *)get_zeroed_page(GFP_KERNEL);
if (!page)
return -ENOMEM;
prev parent reply other threads:[~2005-08-09 13:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-09 0:43 serue
2005-08-09 5:08 ` James Morris
2005-08-09 13:44 ` serue [this message]
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=20050809134424.GB2590@serge.austin.ibm.com \
--to=serue@us.ibm.com \
--cc=akpm@osdl.org \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhalcrow@us.ibm.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
all inboxes | Powered by JetHome®