From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6ABC7C38A2A for ; Thu, 7 May 2020 20:50:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 49773208D6 for ; Thu, 7 May 2020 20:50:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726575AbgEGUuz (ORCPT ); Thu, 7 May 2020 16:50:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:34006 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726218AbgEGUuy (ORCPT ); Thu, 7 May 2020 16:50:54 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F5BF20735; Thu, 7 May 2020 20:50:55 +0000 (UTC) Date: Thu, 7 May 2020 16:50:53 -0400 From: Steven Rostedt To: Julia Lawall Cc: kernel-janitors@vger.kernel.org, Ingo Molnar , linux-kernel@vger.kernel.org, Nic Volanschi , Masami Hiramatsu Subject: Re: [PATCH] tracing/probe: reverse arguments to list_add Message-ID: <20200507165053.291ba5ea@gandalf.local.home> In-Reply-To: <1588879808-24488-1-git-send-email-Julia.Lawall@inria.fr> References: <1588879808-24488-1-git-send-email-Julia.Lawall@inria.fr> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 7 May 2020 21:30:08 +0200 Julia Lawall wrote: > Elsewhere in the file, the function trace_kprobe_has_same_kprobe uses > a trace_probe_event.probes object as the second argument of > list_for_each_entry, ie as a list head, while the list_for_each_entry > iterates over the list fields of the trace_probe structures, making > them the list elements. So, exchange the arguments on the list_add > call to put the list head in the second argument. > > Since both list_head structures were just initialized, this problem > did not cause any loss of information. > > Fixes: 60d53e2c3b75 ("tracing/probe: Split trace_event related data from trace_probe") > Signed-off-by: Julia Lawall Masami, Can you give a Reviewed-by to this? -- Steve > > --- > kernel/trace/trace_probe.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c > index ab8b6436d53f..b8a928e925c7 100644 > --- a/kernel/trace/trace_probe.c > +++ b/kernel/trace/trace_probe.c > @@ -1006,7 +1006,7 @@ int trace_probe_init(struct trace_probe *tp, const char *event, > INIT_LIST_HEAD(&tp->event->class.fields); > INIT_LIST_HEAD(&tp->event->probes); > INIT_LIST_HEAD(&tp->list); > - list_add(&tp->event->probes, &tp->list); > + list_add(&tp->list, &tp->event->probes); > > call = trace_probe_event_call(tp); > call->class = &tp->event->class;