From: Omar Ramirez Luna <omar.ramirez@ti.com>
To: Phil Carmody <ext-phil.2.carmody@nokia.com>
Cc: "Menon, Nishanth" <nm@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 2/2] dspbridge: proc: fix a double-free on 2 error paths
Date: Tue, 16 Feb 2010 18:24:08 -0600 [thread overview]
Message-ID: <4B7B3728.60105@ti.com> (raw)
In-Reply-To: <a6ac4fad65b6e1498010962a06429be40aef5e70.1265991379.git.ext-phil.2.carmody@nokia.com>
On 2/12/2010 10:26 AM, Phil Carmody wrote:
> From: Phil Carmody<ext-phil.2.carmody@nokia.com>
>
> We free in the tail cleanup, so don't free before jumping there.
>
> Signed-off-by: Phil Carmody<ext-phil.2.carmody@nokia.com>
> ---
[...]
> }
> +
> + /* paranoid - must be able to kfree this on remaining error paths */
> + pProcObject->g_pszLastCoff = NULL;
> +
do we need this? afaik it should be NULL at this point, because of
kmalloc + memset (which btw should be replaced by kzalloc).
i.e:
MEM_AllocObject(pProcObject, struct PROC_OBJECT, PROC_SIGNATURE);
-> MEM_Calloc(sizeof(Obj), MEM_NONPAGED);
-> pMem = kmalloc(...)
if (pMem)
memset(pMem, 0, cBytes);
> /* Get the default executable for this board... */
> DEV_GetDevType(hDevObject, (u32 *)&devType);
> pProcObject->uProcessor = devType;
[...]
Regards,
Omar
next prev parent reply other threads:[~2010-02-17 0:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-12 16:26 [PATCH 0/2] dspbridge: proc: double free on error path Phil Carmody
2010-02-12 16:26 ` [PATCH 1/2] dspbridge: proc: it's a pointer, not a handle Phil Carmody
2010-02-12 16:26 ` [PATCH 2/2] dspbridge: proc: fix a double-free on 2 error paths Phil Carmody
2010-02-17 0:24 ` Omar Ramirez Luna [this message]
2010-02-17 13:12 ` Phil Carmody
2010-02-17 15:52 ` Omar Ramirez Luna
2010-02-18 23:53 ` Omar Ramirez Luna
2010-02-18 23:53 ` [PATCH 1/2] dspbridge: proc: it's a pointer, not a handle Omar Ramirez Luna
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=4B7B3728.60105@ti.com \
--to=omar.ramirez@ti.com \
--cc=ext-phil.2.carmody@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.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