Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934470AbZLGWLd (ORCPT ); Mon, 7 Dec 2009 17:11:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932789AbZLGWLc (ORCPT ); Mon, 7 Dec 2009 17:11:32 -0500 Received: from tundra.namei.org ([65.99.196.166]:58874 "EHLO tundra.namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757804AbZLGWLb (ORCPT ); Mon, 7 Dec 2009 17:11:31 -0500 Date: Tue, 8 Dec 2009 09:11:32 +1100 (EST) From: James Morris To: Julia Lawall cc: Stephen Smalley , Eric Paris , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH 5/5] security/selinux/ss: correct size computation In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LRH 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 812 Lines: 36 On Sun, 6 Dec 2009, Julia Lawall wrote: > From: Julia Lawall > > The size argument to kcalloc should be the size of desired structure, > not the pointer to it. > > The semantic patch that makes this change is as follows: > (http://coccinelle.lip6.fr/) > > // > @expression@ > expression *x; > @@ > > x = > <+... > -sizeof(x) > +sizeof(*x) > ...+>// > > Signed-off-by: Julia Lawall Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next -- James Morris -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/