lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 25 Jul 2007 11:53:46 -0700 (PDT)
From:	Christoph Lameter <clameter@....com>
To:	Johannes Berg <johannes@...solutions.net>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] fix slub krealloc()

On Wed, 25 Jul 2007, Johannes Berg wrote:

> > 
> > There is no use of ZERO_OR_NULL ptr in krealloc. Linus added a check to
> > ksize() instead so that ksize(NULL) returns 0 instead of failing.
> 
> However, this still doesn't fix the other corner case I pointed out:
> krealloc(NULL, 0, GFP_KERNEL) will give you a NULL pointer instead of a
> ZERO_SIZE_PTR afaict.

It will give you a ZERO_SIZE_PTR

void *krealloc(const void *p, size_t new_size, gfp_t flags)
{
        void *ret;
        size_t ks;

        if (unlikely(!new_size)) {
                kfree(p);
                return ZERO_SIZE_PTR;
        }



-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ