Hi Daniel,

Thanks for correcting me, i will work on this and try sending the patch soon
with the mentioned changes.

On Sun, Jul 20, 2008 at 12:05 AM, Daniel Stone <[EMAIL PROTECTED]> wrote:

> On Sat, Jul 19, 2008 at 11:16:58PM +0530, nagaraj s k wrote:
> > @@ -69,7 +69,7 @@ void *drm_realloc(void *oldpt, size_t ol
> >  {
> >      void *pt;
> >
> > -    if (!(pt = kmalloc(size, GFP_KERNEL)))
> > +    if (!(pt == kmalloc(size, GFP_KERNEL)))
> >          return NULL;
> >      if (oldpt && oldsize) {
> >          memcpy(pt, oldpt, oldsize);
>
> Er, this is absolutely not an error.  You'll note that pt is
> uninitialised, and the odds of a specific piece of uninitialised memory
> pointing to exactly the location kmalloc returns are ... rather low.
>
> It could be rewritten for clarity as:
> pt = kmalloc(size, GFP_KERNEL);
> if (!pt)
>        return NULL;
>
> But your patch means the function can practically never actually work.
>
> Cheers,
> Daniel
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkiCM9UACgkQUVYB1rKAgJROuwCeLTSHMG6JQsPYPM+uYHEuGv1L
> 8rMAn21162gICH7wp60D07yYo3PBVM3p
> =ZRpc
> -----END PGP SIGNATURE-----
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to