From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: ftrace/perf_event leak Date: Wed, 01 Sep 2010 12:26:14 +0300 Message-ID: <4C7E1C36.6070400@redhat.com> References: <4C7E11E5.1040402@redhat.com> <1283331868.2059.808.camel@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Ingo Molnar , Frederic Weisbecker , Steven Rostedt , kvm-devel , Linux Kernel Mailing List To: Peter Zijlstra Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49081 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751870Ab0IAJ0b (ORCPT ); Wed, 1 Sep 2010 05:26:31 -0400 In-Reply-To: <1283331868.2059.808.camel@laptop> Sender: kvm-owner@vger.kernel.org List-ID: On 09/01/2010 12:04 PM, Peter Zijlstra wrote: > > Does something like the below cure that? > Unfortunately not. > I seem to remember C doesn't make any promises about the order of logic > statements, hence we need to explicitly pull out that try_module_get() > so that it evaluates after the rest of the conditions. && and || are executed in order (so you can write if (p && p->x) ). -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.