From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DDF9313520 for ; Wed, 27 May 2026 06:23:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779863041; cv=none; b=TU3NZct1DAMTW6Ow9IyZEzO0x+bPSfzLlzwVALqYSXokOaVnrm8bBnUB08CFWjba5CARba1I1TzWnd0HCoFzOH4rbIAXPB3H29yOROU7cypE28+Bsbpa9iqxyrjt4CGGI6A9Febktjnes4tL44JPzRDBDPysu1TrVIqeBXn49SE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779863041; c=relaxed/simple; bh=yXavbOgJGAdUlQEGS1RBEw+jkgQmb76OwhKj/lFQJqk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lmOsjDsSzPeIpLg++r+1sZp0pKsNw3vXTzW1/lx8LSv9HI5bpGpEXj6c2ziQ/BJKjI9oRnMX7GDm/ZX286v0nJL6UNfHg3cwMjh8X5zs7Fa/XV+Td8Ix9gTMbgQNlO4tAZ3WDuo/wFLRsHyccX0eeWRG+sCs35bxiIzkzFmudM8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=TGWrZtzY; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TGWrZtzY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779863038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UA0PFohOj15Jgq9Y3jQIIxa6b/L9rthaIIUjUoXjxGU=; b=TGWrZtzY9OIk6lcqkxAGDCpJ4jZpCez42xgD0jzTZ2lrUclhMQ6xd2RcJ4kuc9DKZTH2Wd W1Dz31eKSPukOI2Sbh0HD23HVGtjDKYauiBd+RZRlrnaEAFVxD1bKWQXbEMAlDStpPkjXk i860B6Ym/oa3Bu4+xbc50Dw5xmRjvpQ= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-98-o-lGshGEMwqorcMa_nz3hg-1; Wed, 27 May 2026 02:23:54 -0400 X-MC-Unique: o-lGshGEMwqorcMa_nz3hg-1 X-Mimecast-MFC-AGG-ID: o-lGshGEMwqorcMa_nz3hg_1779863033 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 391C318002CB; Wed, 27 May 2026 06:23:53 +0000 (UTC) Received: from gmonaco-thinkpadt14gen3.rmtit.csb (unknown [10.44.32.86]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E8F381800576; Wed, 27 May 2026 06:23:50 +0000 (UTC) From: Gabriele Monaco To: linux-kernel@vger.kernel.org, Steven Rostedt , Gabriele Monaco , Nam Cao , linux-trace-kernel@vger.kernel.org Cc: Wen Yang Subject: [PATCH v2 06/12] rv: Ensure all pending probes terminate on per-obj monitor destroy Date: Wed, 27 May 2026 08:23:06 +0200 Message-ID: <20260527062313.39908-7-gmonaco@redhat.com> In-Reply-To: <20260527062313.39908-1-gmonaco@redhat.com> References: <20260527062313.39908-1-gmonaco@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 The monitor disable/destroy sequence detaches all probes and resets the monitor's data, however it doesn't wait for pending probes. This is an issue with per-object monitors, which free the monitor storage. Call tracepoint_synchronize_unregister() to make sure to wait for all pending probes before destroying the monitor storage. Fixes: 4a24127bd6cb ("rv: Add support for per-object monitors in DA/HA") Reviewed-by: Wen Yang Signed-off-by: Gabriele Monaco --- include/rv/da_monitor.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/rv/da_monitor.h b/include/rv/da_monitor.h index 446a4d53d99c..5f790e1694b4 100644 --- a/include/rv/da_monitor.h +++ b/include/rv/da_monitor.h @@ -519,9 +519,10 @@ static inline void da_monitor_destroy(void) struct hlist_node *tmp; int bkt; + tracepoint_synchronize_unregister(); /* - * This function is called after all probes are disabled, we need only - * worry about concurrency against old events. + * This function is called after all probes are disabled and no longer + * pending, we can safely assume no concurrent user. */ synchronize_rcu(); hash_for_each_safe(da_monitor_ht, bkt, tmp, mon_storage, node) { -- 2.54.0