[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1201142156220.11547@swampdragon.chaosbits.net>
Date: Sat, 14 Jan 2012 21:58:49 +0100 (CET)
From: Jesper Juhl <jj@...osbits.net>
To: linux-kernel@...r.kernel.org
cc: dri-devel@...ts.freedesktop.org,
Octavian Purdila <octavian.purdila@...el.com>,
Dave Airlie <airlied@...hat.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
Alan Cox <alan@...ux.intel.com>,
David Airlie <airlied@...ux.ie>, Eric Anholt <eric@...olt.net>,
Jesse Barnes <jesse.barnes@...el.com>
Subject: Re: [PATCH] intel, gma500, lvds: Fix use after free on
psb_intel_lvds_init()
On Sat, 14 Jan 2012, Jesper Juhl wrote:
> In psb_intel_lvds_init(), if we fail to allocate memory for
> 'psb_intel_connector' we free the memory we previously allocated for
> 'psb_intel_encoder', but we then proceed to use that free'd pointer
> when we do 'psb_intel_encoder->dev_priv = lvds_priv;'.
>
> I believe the proper way to handle this is to simply return after the
> allocation for 'psb_intel_connector' has failed. That is what this
> patch does.
>
Ok, so I just noticed that we may also leak 'psb_intel_encoder' if we
'goto failed_connector;'. Might as well fix that as well in the same
patch.
So please just ignore this one. I'll submit a new one in a little
while that handles both leaks.
--
Jesper Juhl <jj@...osbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists