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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0708172036151.30502@fbirervta.pbzchgretzou.qr>
Date:	Fri, 17 Aug 2007 20:37:00 +0200 (CEST)
From:	Jan Engelhardt <jengelh@...putergmbh.de>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	Satyam Sharma <satyam@...radead.org>,
	Arjan van de Ven <arjan@...radead.org>,
	Tim Bird <tim.bird@...sony.com>,
	linux kernel <linux-kernel@...r.kernel.org>,
	Christoph Lameter <clameter@....com>
Subject: Re: kfree(0) - ok?


On Aug 17 2007 11:22, Andrew Morton wrote:

>Which is getting pretty idiotic:
>
>akpm:/usr/src/25> grep ZERO_OR_NULL_PTR */*.c
>mm/slab.c:              BUG_ON(ZERO_OR_NULL_PTR(cachep->slabp_cache));
>mm/slab.c:      if (unlikely(ZERO_OR_NULL_PTR(cachep)))
>mm/slab.c:      if (unlikely(ZERO_OR_NULL_PTR(cachep)))
>mm/slab.c:      if (unlikely(ZERO_OR_NULL_PTR(objp)))
>mm/slab.c:      if (unlikely(ZERO_OR_NULL_PTR(objp)))
>mm/slob.c:      if (unlikely(ZERO_OR_NULL_PTR(block)))
>mm/slob.c:      if (unlikely(ZERO_OR_NULL_PTR(block)))
>mm/slob.c:      if (unlikely(ZERO_OR_NULL_PTR(block)))
>mm/slub.c:      if (unlikely(ZERO_OR_NULL_PTR(s)))
>mm/slub.c:      if (unlikely(ZERO_OR_NULL_PTR(s)))
>mm/slub.c:      if (unlikely(ZERO_OR_NULL_PTR(object)))
>mm/slub.c:      if (unlikely(ZERO_OR_NULL_PTR(x)))
>mm/slub.c:      if (unlikely(ZERO_OR_NULL_PTR(s)))
>mm/slub.c:      if (unlikely(ZERO_OR_NULL_PTR(s)))
>
>are we seeing a pattern here?  We could stick the unlikely inside
>ZERO_OR_NULL_PTR() itself.

Yeah,

	BUG_ON(unlikely(ZERO_OR_NULL_PTR(..)))

that will really help the bug - "hm, it's Friday, let's BUG" ;-)



	Jan
-- 
-
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