public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Wright <chris@wirex.com>
To: James Morris <jmorris@intercode.com.au>
Cc: "David S. Miller" <davem@redhat.com>,
	kuznet@ms2.inr.ac.ru, Andi Kleen <ak@muc.de>,
	linux-kernel@vger.kernel.org, Matthew Wilcox <willy@debian.org>
Subject: Re: [PATCH][RFC] sigurg/sigio cleanup for 2.5.31
Date: Fri, 16 Aug 2002 00:06:29 -0700	[thread overview]
Message-ID: <20020816000629.A15216@figure1.int.wirex.com> (raw)
In-Reply-To: <Mutt.LNX.4.44.0208160302100.28909-100000@blackbird.intercode.com.au>; from jmorris@intercode.com.au on Fri, Aug 16, 2002 at 03:16:57AM +1000

* James Morris (jmorris@intercode.com.au) wrote:
> @@ -95,15 +96,14 @@
>  		prev = &odn->dn_next;
>  	}
>  
> -	error = security_ops->file_set_fowner(filp);
> +	lock_kernel();
> +	error = f_setown(filp, current->pid);
> +	unlock_kernel();
>  	if (error) {
>  		write_unlock(&dn_lock);
>  		return error;
>  	}

This propagates a leak which John Levon found in current mainline.  Needs a
kmem_cache_free(dn_cache, dn) before returning.  You may consider goto
for common unlock/return path.  Is BKL best way to protect f_owner?

cheers,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

  parent reply	other threads:[~2002-08-16  7:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-15 17:16 [PATCH][RFC] sigurg/sigio cleanup for 2.5.31 James Morris
2002-08-15 19:04 ` Matthew Wilcox
2002-08-16  0:10   ` James Morris
2002-08-15 22:36 ` kuznet
2002-08-16 13:07   ` James Morris
2002-08-16 14:50     ` kuznet
2002-08-16 15:03       ` James Morris
2002-08-16 15:16         ` kuznet
2002-08-16  7:06 ` Chris Wright [this message]
2002-08-16 16:25 ` Jeff Dike
2002-08-16 15:59   ` James Morris
2002-08-17 18:16     ` Alan Cox
2002-08-18  0:57       ` James Morris
2002-08-19  1:16         ` James Morris
2002-08-17  2:58 ` [PATCH][RFC] sigurg/sigio cleanup for 2.5.31 [version 2] James Morris
2002-08-19  2:28   ` Jeff Dike
2002-08-19  1:37     ` James Morris
2002-08-19 10:14   ` [PATCH][RFC] sigurg/sigio cleanup for 2.5.31 [version 3] James Morris

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=20020816000629.A15216@figure1.int.wirex.com \
    --to=chris@wirex.com \
    --cc=ak@muc.de \
    --cc=davem@redhat.com \
    --cc=jmorris@intercode.com.au \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@debian.org \
    /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