mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Kylene Jo Hall <kjhall@us.ibm.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	akpm@osdl.org, Mimi Zohar <zohar@us.ibm.com>,
	Dave Safford <safford@us.ibm.com>,
	Serge Hallyn <sergeh@us.ibm.com>
Subject: Re: [PATCH] slim: fix bug with mm_users usage
Date: Sat, 23 Sep 2006 15:38:34 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0609231527560.26585@blonde.wat.veritas.com> (raw)
In-Reply-To: <1158966797.20493.76.camel@localhost.localdomain>

On Fri, 22 Sep 2006, Kylene Jo Hall wrote:

Nothing to do with this patch as such, but as it went past I noticed

> --- linux-2.6.18-rc6-orig/security/slim/slm_main.c	2006-09-18 16:41:51.000000000 -0500
> +++ linux-2.6.18-rc6/security/slim/slm_main.c	2006-09-22 13:58:35.000000000 -0500
> @@ -529,7 +519,7 @@ static int enforce_integrity_read(struct
>  	spin_lock(&cur_tsec->lock);
>  	if (!is_iac_less_than_or_exempt(level, cur_tsec->iac_r)) {
>  		rc = has_file_wperm(level);
> -		if (atomic_read(&current->mm->mm_users) != 1)
> +		if (current->mm && atomic_read(&current->mm->mm_users) != 1)
>  			rc = 1;

I've not studied your patches, and I don't know what that line's about,
but you appear to be attaching considerable significance to the value of
mm->mm_users.  Yet swapoff (try_to_unuse) has to bump it up to hold the
mm temporarily, as does get_task_mm() used in various places (mainly /proc).

Hugh

      reply	other threads:[~2006-09-23 14:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-22 23:13 Kylene Jo Hall
2006-09-23 14:38 ` Hugh Dickins [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=Pine.LNX.4.64.0609231527560.26585@blonde.wat.veritas.com \
    --to=hugh@veritas.com \
    --cc=akpm@osdl.org \
    --cc=kjhall@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=safford@us.ibm.com \
    --cc=sergeh@us.ibm.com \
    --cc=zohar@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®