From: Greg KH <greg@kroah.com>
To: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: securityfs_create_dir strange comment
Date: Tue, 20 Feb 2007 14:26:52 -0800 [thread overview]
Message-ID: <20070220222652.GB21696@kroah.com> (raw)
In-Reply-To: <20070220211849.GA3416@vino.hallyn.com>
On Tue, Feb 20, 2007 at 03:18:49PM -0600, Serge E. Hallyn wrote:
> Quoting Jan Engelhardt (jengelh@linux01.gwdg.de):
> > Hello list,
> >
> >
> > in security/inode.c, the comment for securityfs_create_dir() reads:
> >
> > If securityfs is not enabled in the kernel, the value -ENODEV
> > will be returned. It is not wise to check for this value, but
> > rather, check for NULL or !NULL instead as to eliminate the need
> > for #ifdef in the calling code.
> >
> > What is the actual callee that can return NULL - and what should
> > module_init() of a module return when securityfs_create_dir() returns
> > NULL?
>
> Hmm, this came from GregKH. It does seem based on the code that
> checking for -ENODEV is necessary, so I don't understand the comment.
If securityfs_create_dir() returns NULL, then something bad happened and
your code needs to properly recover from it.
Other than that, I don't understand the issue here.
confused,
greg k-h
next prev parent reply other threads:[~2007-02-20 22:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-18 15:45 Jan Engelhardt
2007-02-20 21:18 ` Serge E. Hallyn
2007-02-20 22:26 ` Greg KH [this message]
2007-02-20 23:45 ` Jan Engelhardt
2007-02-21 4:05 ` Greg KH
2007-02-21 17:07 ` Jan Engelhardt
2007-02-21 17:29 ` Greg KH
2007-02-21 17:46 ` Jan Engelhardt
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=20070220222652.GB21696@kroah.com \
--to=greg@kroah.com \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®