Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754191Ab0DUKuV (ORCPT ); Wed, 21 Apr 2010 06:50:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33754 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754044Ab0DUKuT (ORCPT ); Wed, 21 Apr 2010 06:50:19 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20100421012908.GB24251@us.ibm.com> References: <20100421012908.GB24251@us.ibm.com> <20100421012749.GA21338@us.ibm.com> To: "Serge E. Hallyn" Cc: dhowells@redhat.com, lkml , Ashwin Ganti , Greg KH , rsc@swtch.com, ericvh@gmail.com, linux-security-module@vger.kernel.org, Ron Minnich , jt.beard@gmail.com, Andrew Morton , Andrew Morgan , oleg@us.ibm.com, Eric Paris , "Eric W. Biederman" , linux-api@vger.kernel.org, Randy Dunlap Subject: Re: [PATCH 3/3] p9auth: add p9auth driver Date: Wed, 21 Apr 2010 11:49:15 +0100 Message-ID: <23120.1271846955@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 557 Lines: 24 Serge E. Hallyn wrote: > + if (ret == 0) > + commit_creds(new); > + else > + abort_creds(new); > + > + return ret; If you make this: if (ret == 0) return commit_creds(new); abort_creds(new); return ret; then gcc can tail-call commit_creds(), which is guaranteed to return 0. David -- 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/