All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christopher J. PeBenito" <cpebenito@tresys.com>
To: James Morris <jmorris@namei.org>
Cc: sds@tycho.nsa.gov, jmorris@redhat.com, eparis@redhat.com,
	selinux@tycho.nsa.gov
Subject: Re: [PATCH 1/4] selinux: add support for querying object classes and permissions from the running policy
Date: Mon, 21 May 2007 18:44:18 +0000	[thread overview]
Message-ID: <1179773058.10995.17.camel@sgc> (raw)
In-Reply-To: <Line.LNX.4.64.0705211253190.17008@d.namei>

On Mon, 2007-05-21 at 13:02 -0400, James Morris wrote:
> On Mon, 21 May 2007, Christopher J. PeBenito wrote:
> > +int security_get_classes(char ***classes, int *nclasses)
> > +{
> > +	int rc = -ENOMEM;
> > +
> > +	POLICY_RDLOCK;
> > +
> > +	*nclasses = policydb.p_classes.nprim;
> > +	*classes = kzalloc(*nclasses*sizeof(*classes),GFP_KERNEL);
> 
> Use kcalloc().
> 
> Needs to be GFP_ATOMIC because you're holding a spinlock.
[...]
> (Have you tested this with all of the lock debugging enabled ?)

Nope, my mistake.  I'm a kernel coding newbie :)

-- 
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2007-05-21 18:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-21 15:38 [PATCH 0/4] selinux: add object class discovery Christopher J. PeBenito
2007-05-21 15:38 ` [PATCH 1/4] selinux: add support for querying object classes and permissions from the running policy Christopher J. PeBenito
2007-05-21 15:38   ` [PATCH 2/4] selinux: rename sel_remove_bools() for more general usage Christopher J. PeBenito
2007-05-21 15:38     ` [PATCH 3/4] selinux: change sel_make_dir() to specify inode counter Christopher J. PeBenito
2007-05-21 15:38       ` [PATCH 4/4] selinux: add selinuxfs structure for object class discovery Christopher J. PeBenito
2007-05-21 17:18         ` James Morris
2007-05-21 18:41           ` Christopher J. PeBenito
2007-05-21 18:58             ` James Morris
2007-05-21 17:02   ` [PATCH 1/4] selinux: add support for querying object classes and permissions from the running policy James Morris
2007-05-21 18:44     ` Christopher J. PeBenito [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-05-23 13:12 selinux: add object class discovery v2 Christopher J. PeBenito
2007-05-23 13:12 ` [PATCH 1/4] selinux: add support for querying object classes and permissions from the running policy Christopher J. PeBenito
2007-05-23 15:42   ` James Antill
2007-05-23 17:25     ` Christopher J. PeBenito

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=1179773058.10995.17.camel@sgc \
    --to=cpebenito@tresys.com \
    --cc=eparis@redhat.com \
    --cc=jmorris@namei.org \
    --cc=jmorris@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.