Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3767448pxt; Tue, 10 Aug 2021 10:51:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfuXeazmcWndX55rPX078sbsw3QCWAU9rmGS8sVsrBrGJLT4mWGarPhmLeuWDb1v28GO05 X-Received: by 2002:a05:6638:40ab:: with SMTP id m43mr16305781jam.52.1628617871700; Tue, 10 Aug 2021 10:51:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617871; cv=none; d=google.com; s=arc-20160816; b=qOfdFirQPqQOigkuFD1GpkTd8MNgnyfQV0Ur2J9ZdIPNRIuI9iejnRa9yGIh8R7IAU PDsANlUeFxEqztKyQ9e4kXckyV2Z8kn9IB1BjHLrzipt3aHZm3okcRwRk47luKfvlUBi ES0hvmJsO0dxl6JKOeAhdhZjqXJQpuC1tDkM/rHve0BFC0bAXpYUnx94juQh3r1p8b0r UPr+fltPvJkjpxfZxcsSZkOEc/5KEv70JYoR52Lt+FHA2Xb3L9M/WgO/1VrBmUc/YeJU IsEa9cnH0QfDZiLmsNcAvw2OpZl6tyTOSP9DjF9sDlAZ2sNsbpF43Y2uSnqHQPPlXB4X iD3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=C7tVrvR8ayDVacpGL9L4uJTVFVjDk9mL5oMVYxn33aY=; b=c3NhpK+rWuD5hIYNpIdHoIvR/LLyiMnf9Fa44j3lUo9dnEiHCR5bRuqCa9KlFctEeH 6PfZDxIHwp73zcLSYC+IJT2xQPDN14XOVDAlAyXaJFL8t1I7e4LqBS9s6Y7QV3uTxX1U YgcxjJNp8E8/OBtUskSXW4zEnH/hFBdXG8PCol3bn3im+65z91k/6StJCf972RW3O86c Zar3bAPwLW+sr0OAVIUkY4aZzlhoSTtgQ+fh7pRKnCCGF+3rEmD9XKHi3d1AyGLnjEDt 04BoedutA2rGx02xeV2oS2ThvmQ034Oikxmk9VanTPeOOgFcv877wLgecG7iu/3Jqws+ u41Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CII7vpKh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si6780461iod.28.2021.08.10.10.50.59; Tue, 10 Aug 2021 10:51:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CII7vpKh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237308AbhHJRuW (ORCPT + 99 others); Tue, 10 Aug 2021 13:50:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:32800 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236236AbhHJRq7 (ORCPT ); Tue, 10 Aug 2021 13:46:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 55EFD61260; Tue, 10 Aug 2021 17:40:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617249; bh=KqXDFD6igxKn7WUli2jPpng69mg8Ha6TY3DfR4qYJbk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CII7vpKhE6id+KGMiMgSUQXi14AhXDNgsaOwVksEd+vN08aZlXgRPvYaJaGJKzZJF lJTiQGJWcZ3ppwTz0Q87F23xCdFxcS2+WIA110yUs1lmOcFKoDvHBNjTOliy6pUDrL hZoYvqiP8+AgqsuDQ/BYDw4P6qGozdPfzsipHOSA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Andrew Morton , "Paul E. McKenney" , Stefan Metzmacher , Mathieu Desnoyers , "Steven Rostedt (VMware)" Subject: [PATCH 5.10 078/135] tracepoint: static call: Compare data on transition from 2->1 callees Date: Tue, 10 Aug 2021 19:30:12 +0200 Message-Id: <20210810172958.382412734@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mathieu Desnoyers commit f7ec4121256393e1d03274acdca73eb18958f27e upstream. On transition from 2->1 callees, we should be comparing .data rather than .func, because the same callback can be registered twice with different data, and what we care about here is that the data of array element 0 is unchanged to skip rcu sync. Link: https://lkml.kernel.org/r/20210805132717.23813-2-mathieu.desnoyers@efficios.com Link: https://lore.kernel.org/io-uring/4ebea8f0-58c9-e571-fd30-0ce4f6f09c70@samba.org/ Cc: stable@vger.kernel.org Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Andrew Morton Cc: "Paul E. McKenney" Cc: Stefan Metzmacher Fixes: 547305a64632 ("tracepoint: Fix out of sync data passing by static caller") Signed-off-by: Mathieu Desnoyers Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Greg Kroah-Hartman --- kernel/tracepoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/tracepoint.c +++ b/kernel/tracepoint.c @@ -359,7 +359,7 @@ static int tracepoint_remove_func(struct } else { rcu_assign_pointer(tp->funcs, tp_funcs); tracepoint_update_call(tp, tp_funcs, - tp_funcs[0].func != old[0].func); + tp_funcs[0].data != old[0].data); } release_probes(old); return 0;