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 DA1F43064AE for ; Sat, 30 May 2026 14:17:15 +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=1780150637; cv=none; b=ckb+TMrpK1XGEzaBb2uvQ5N/NZOr6fnSbp/6OkN/ZUh3FWbejYaNVeGvpRv0ProXB4niex4vwliP8uHkWgLAHxc1bFIQ9hKnzE/RjNPygdTPUHhf3m7cMkpgNFRHnDH80ONrWwCx4gvt6fIBUZ68tHJkeLExt7RrDa1SJICl0hc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780150637; c=relaxed/simple; bh=gFdwMA8XHL/34A2qgdCDIwi1WjLV/OpiyLi0vEnRgYk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ufwo89Ygid2C/VkWh9FvLedbOPdE7BbQ11azvUBec7N99F6HJ6dlHNN9n2QTu0x2o4aXZQ9j0n8Gc8/ZbgCbYdtLNm75/nt0kAdHShbfXPe7GW1lu9e1iYHX7Zv35/kuZFMPAxvxqSKT8rzwHWhB4y8SvgvmjXbUKjogOgchDG0= 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=cM2LMQHG; 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="cM2LMQHG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1780150635; 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=Dl6dXWp6P9btDw571JyJSrz97r1npQl76nCQ2UqxzpM=; b=cM2LMQHGAaKlG6nzNTYALeuMT5RwpOQltPGje7+B8Eo6Gnt+vrG/QP2gdMaV1Qun7o3ake 5/Zy9erXk8+k4zv3tMrJjOHnLKDwI7lhc6V7Ybihx66hryGy5kb9K/plwA6eXCASFClgyH XuZccZVHmhL0RrZPN9xeXoE1+mGQicM= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-104-BBFmwEcXNT6rK4MMcnNAeg-1; Sat, 30 May 2026 10:17:11 -0400 X-MC-Unique: BBFmwEcXNT6rK4MMcnNAeg-1 X-Mimecast-MFC-AGG-ID: BBFmwEcXNT6rK4MMcnNAeg_1780150630 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D0C6F19560B2; Sat, 30 May 2026 14:17:09 +0000 (UTC) Received: from fedora-pc.redhat.corp (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E673730001BB; Sat, 30 May 2026 14:17:07 +0000 (UTC) From: Gabriele Monaco To: linux-kernel@vger.kernel.org, Steven Rostedt , Gabriele Monaco , linux-trace-kernel@vger.kernel.org Cc: Wen Yang , Nam Cao Subject: [PATCH v3 04/13] rv: Ensure all pending probes terminate on per-obj monitor destroy Date: Sat, 30 May 2026 16:16:43 +0200 Message-ID: <20260530141652.58084-5-gmonaco@redhat.com> In-Reply-To: <20260530141652.58084-1-gmonaco@redhat.com> References: <20260530141652.58084-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.4 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 Reviewed-by: Nam Cao 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 cc97cc5df..a7e103654 100644 --- a/include/rv/da_monitor.h +++ b/include/rv/da_monitor.h @@ -511,9 +511,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