Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753563AbYKQQTN (ORCPT ); Mon, 17 Nov 2008 11:19:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752083AbYKQQS6 (ORCPT ); Mon, 17 Nov 2008 11:18:58 -0500 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.123]:49919 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751962AbYKQQS6 (ORCPT ); Mon, 17 Nov 2008 11:18:58 -0500 Date: Mon, 17 Nov 2008 11:18:53 -0500 (EST) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Paul Mackerras cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Thomas Gleixner , Peter Zijlstra , David Miller , Benjamin Herrenschmidt , Frederic Weisbecker , Pekka Paalanen , linuxppc-dev@ozlabs.org, Rusty Russell , Paul Mundt , Steven Rostedt Subject: Re: [PATCH 5/7] ftrace, PPC64: handle module trampolines for dyn ftrace In-Reply-To: <18720.64083.306981.779763@drongo.ozlabs.ibm.com> Message-ID: References: <20081116212428.938752312@goodmis.org> <20081116212516.000516128@goodmis.org> <18720.64083.306981.779763@drongo.ozlabs.ibm.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) 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: 1013 Lines: 33 On Mon, 17 Nov 2008, Paul Mackerras wrote: > Steven Rostedt writes: > > > + if (!rec->arch.mod) { > > + if (!mod) { > > + printk(KERN_ERR "No module loaded addr=%lx\n", > > + addr); > > + return -EFAULT; > > + } > > + rec->arch.mod = mod; > > + } else if (mod) { > > + printk(KERN_ERR > > + "Record mod %p not equal to passed in mod %p\n", > > + rec->arch.mod, mod); > > + return -EINVAL; > > That looks wrong; surely you need an if (mod != rec->arch.mod) > somewhere here? BTW, the reason this still worked was because only the first instance passes in mod (when rec->arch.mod does not exist). After that, mod is NULL, so we never enter this case. But still, I will need to fix this (even though I thought I did). -- Steve -- 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/