Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp4927333ima; Tue, 5 Feb 2019 03:44:26 -0800 (PST) X-Google-Smtp-Source: AHgI3IYbV+5xlzbbCEiFBa7DTRxQFHAKL0bJCzktGWf4wcAT92izcbLcpWENcFJAm1e6iZ5uIEI9 X-Received: by 2002:a62:cf02:: with SMTP id b2mr4690360pfg.183.1549367066255; Tue, 05 Feb 2019 03:44:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549367066; cv=none; d=google.com; s=arc-20160816; b=CVA9/i6UQ1sHh9uOiQihhAhSGL8fOsUcX1I/tb7sRbzjUiFe+13Mj1Y05ft+2Nf13X DnzyUqG5wUpqql5QVEJ5nU56EL4XU0Za/DoVfLcqHe7L9hTtb85pUyI7BYid9Vq3Jh0h zYJ7tu6ZS7vGLZj72zBT8nZJm9xlX8bWpW93Ji1XJdOLK+3bw2E26+/z2EPt7bKidEP5 FqIjX4iQKxUJO5BWPZH82rUIh0WT5O3yWRm0ZjKOIyL5MxEXDbn8xAn2J73eiRpknxwc GjMg/bCz7MU0srITme9gt+jB09MgaLMaW7agz4k6XQokL5+VO4LwaUuFDvgPtrihU+pC dXEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=PtaVALugGX0xOg56F8Vf7PB5eNLbihUngzDV5hCxp0E=; b=WlrhUpRtLZk3yjBOhBthJApAc0UvmYJ2Sh+lvtQatBtz8snH7RhZ5vXb/FwcQqo5ti Jps7hA1isC3wgh7Cn1xFtRpILVc5KoGq5zD1T+Gre386f1fCZXgnTatkQMDnTa3jTA+L yn43DT11gvnVyxchTb4OEUvWtFqWdQbZk+VUtQfrA0sUQvQFBKVm5kEmF95dAEEL4Vyg a80J0s1KKj8+SaH7j1V310NPptYYDrNtp5oD6iwWFJrfvJh2vA6Tec3JXLU/um1bmnoi DLiQOFt+6hG5WbZyhZPxqXvsYqdj27bvJETIVbm65ZgKbug/ifmIO8i8wgER4Tx0R/JH Ld8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f39si3005256plb.369.2019.02.05.03.44.09; Tue, 05 Feb 2019 03:44:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728080AbfBELkj (ORCPT + 99 others); Tue, 5 Feb 2019 06:40:39 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:40156 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbfBELki (ORCPT ); Tue, 5 Feb 2019 06:40:38 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5BA0B80D; Tue, 5 Feb 2019 03:40:38 -0800 (PST) Received: from [10.1.196.93] (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AFDC13F675; Tue, 5 Feb 2019 03:40:33 -0800 (PST) Subject: Re: [PATCH 5/5] perf/arm_dsu: Fix CPU hotplug races To: robin.murphy@arm.com, will.deacon@arm.com, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, peterz@infradead.org, tglx@linutronix.de, bigeasy@linutronix.de References: From: Suzuki K Poulose Message-ID: <9fcf862c-0d07-cece-852f-6c09128aa0c5@arm.com> Date: Tue, 5 Feb 2019 11:40:31 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/02/2019 17:09, Robin Murphy wrote: > Like other system PMUs which associate themselves with an arbitrary CPU > for housekeeping purposes, arm_dsu has a race between registering the > hotplug notifier and registering the PMU device, such that the hotplug > niotifier can potentially fire and attempt to migrate the PMU context > before the latter is valid. This is easily resolved by inhibiting > hotplug until both the notifier and PMU device are successfully set up. > > For the same reason, also suppress any synchronous notifier calls in the > cleanup path if PMU registration fails. > > Signed-off-by: Robin Murphy Should we add : Fixes: commit 7520fa99246dade7ab6 ("perf: ARM DynamIQ Shared Unit PMU support") Either way: Reviewed-by: Suzuki K Poulose