The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Gerald Schaefer <geraldsc@de.ibm.com>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: akpm@osdl.org, jmorris@redhat.com, schwidefsky@de.ibm.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] SELinux: memory leak in selinux_sb_copy_data()
Date: Fri, 17 Jun 2005 18:18:16 +0200	[thread overview]
Message-ID: <1119025096.7006.83.camel@thinkpad> (raw)
In-Reply-To: <1119023825.15306.30.camel@moss-spartans.epoch.ncsc.mil>

On Fri, 2005-06-17 at 11:57 -0400, Stephen Smalley wrote:
> 
> Shouldn't that be nosec_save?  nosec is advanced by take_option().
> 
That's right, I muddled that up. Hope I got this one-line patch right
this time...

diff -pruN linux-2.6-git/security/selinux/hooks.c linux-2.6-git_xxx/security/selinux/hooks.c
--- linux-2.6-git/security/selinux/hooks.c	2005-06-16 20:01:03.000000000 +0200
+++ linux-2.6-git_xxx/security/selinux/hooks.c	2005-06-17 14:38:08.000000000 +0200
@@ -1945,6 +1945,7 @@ static int selinux_sb_copy_data(struct f
 	} while (*in_end++);
 
 	copy_page(in_save, nosec_save);
+	free_page((unsigned long)nosec_save);
 out:
 	return rc;
 }


  reply	other threads:[~2005-06-17 16:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-17 13:18 [PATCH 1/1] SELinux: memory leak in selinux_sb_copy_data() Gerald Schaefer
2005-06-17 15:47 ` Gerald Schaefer
2005-06-17 15:57   ` Stephen Smalley
2005-06-17 16:18     ` Gerald Schaefer [this message]
2005-06-17 17:33       ` Stephen Smalley

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=1119025096.7006.83.camel@thinkpad \
    --to=geraldsc@de.ibm.com \
    --cc=akpm@osdl.org \
    --cc=jmorris@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=sds@epoch.ncsc.mil \
    /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