From: David Howells <dhowells@redhat.com>
To: Jesper Juhl <juhl-lkml@dif.dk>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Stephen Smalley <sds@epoch.ncsc.mil>,
Chris Vance <cvance@nai.com>, Wayne Salamon <wsalamon@nai.com>,
James Morris <jmorris@redhat.com>,
dgoeddel@trustedcs.com, Karl MacMillan <kmacmillan@tresys.com>,
Frank Mayer <mayerf@tresys.com>,
selinux@tycho.nsa.gov, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] don't do pointless NULL checks and casts before kfree() in security/
Date: Tue, 22 Mar 2005 15:34:26 +0000 [thread overview]
Message-ID: <9581.1111505666@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.62.0503201316270.2501@dragon.hyggekrogen.localhost>
Jesper Juhl <juhl-lkml@dif.dk> wrote:
> --- linux-2.6.11-mm4-orig/security/keys/key.c 2005-03-16 15:45:42.000000000 +0100
> +++ linux-2.6.11-mm4/security/keys/key.c 2005-03-20 12:40:19.000000000 +0100
> ...
> - if (candidate)
> - kfree(candidate);
> + kfree(candidate);
Looks okay to me. It's probably less efficient though, but more space
efficient.
> --- linux-2.6.11-mm4-orig/security/keys/user_defined.c 2005-03-16 15:45:42.000000000 +0100
> +++ linux-2.6.11-mm4/security/keys/user_defined.c 2005-03-20 12:41:54.000000000 +0100
> @@ -182,9 +182,7 @@ static int user_match(const struct key *
> */
> static void user_destroy(struct key *key)
> {
> - struct user_key_payload *upayload = key->payload.data;
> -
> - kfree(upayload);
> + kfree(key->payload.data);
There's a patch in Andrew Morton's tree that changes this to make use of RCU,
so I'd prefer you didn't do this just yet.
David
next prev parent reply other threads:[~2005-03-22 15:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-20 12:29 [PATCH] don't do pointless NULL checks and casts before kfree() in security/ Jesper Juhl
2005-03-20 12:50 ` Ralph Corderoy
2005-03-20 13:18 ` Jesper Juhl
2005-03-20 13:31 ` Ralph Corderoy
2005-03-20 14:04 ` YOSHIFUJI Hideaki / 吉藤英明
2005-03-20 14:39 ` Jesper Juhl
2005-03-21 10:17 ` Ralph Corderoy
2005-03-22 15:00 ` Stephen Smalley
2005-03-22 15:00 ` Stephen Smalley
2005-03-22 20:57 ` [PATCH] don't do pointless NULL checks and casts before kfree() in security/selinux/ Jesper Juhl
2005-03-22 15:34 ` David Howells [this message]
2005-03-22 20:46 ` [PATCH] don't do pointless NULL checks and casts before kfree() in security/ Jesper Juhl
[not found] <fa.p25ihnj.4026at@ifi.uio.no>
[not found] ` <fa.iqmuavi.o6kfai@ifi.uio.no>
2005-03-20 13:18 ` Bodo Eggert
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=9581.1111505666@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=cvance@nai.com \
--cc=dgoeddel@trustedcs.com \
--cc=jmorris@redhat.com \
--cc=juhl-lkml@dif.dk \
--cc=kmacmillan@tresys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mayerf@tresys.com \
--cc=sds@epoch.ncsc.mil \
--cc=selinux@tycho.nsa.gov \
--cc=wsalamon@nai.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 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.