linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Suzuki K Poulose <suzuki.poulose@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
Subject: Re: [PATCH 5/5] perf/arm_dsu: Fix CPU hotplug races
Date: Tue, 5 Feb 2019 13:04:23 +0000	[thread overview]
Message-ID: <84bdba44-9ce1-906c-0575-f931435de886@arm.com> (raw)
In-Reply-To: <9fcf862c-0d07-cece-852f-6c09128aa0c5@arm.com>

Hi Suzuki,

On 05/02/2019 11:40, Suzuki K Poulose wrote:
> 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 <robin.murphy@arm.com>
> 
> Should we add :
> 
> Fixes: commit 7520fa99246dade7ab6 ("perf: ARM DynamIQ Shared Unit PMU 
> support")
> 
> Either way:
> 
> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>

Thanks for the reviews! I think this patch is worthwhile for cleanliness 
and consistency, but since it's neither self-contained (with the 
dependency on #4) nor "fix[ing] a real bug that bothers people" I'm not 
convinced it really deserves backporting - unlike the preemption issue, 
actually getting a crash from this race in practice is unlikely enough 
that it would probably require some determined, deliberate effort to 
trigger it with just the right conditions.

Cheers,
Robin.

  reply	other threads:[~2019-02-05 13:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 17:09 [PATCH 0/5] Fix Arm system PMU hotplug issues Robin Murphy
2019-02-04 17:09 ` [PATCH 1/5] perf/arm-cci: Fix CPU hotplug race avoidance Robin Murphy
2019-02-05 10:10   ` Corentin Labbe
2019-02-05 11:19   ` Suzuki K Poulose
2019-02-10 20:43   ` Thomas Gleixner
2019-02-04 17:09 ` [PATCH 2/5] cpu/hotplug: Export __cpuhp_state_add_instance_cpuslocked() Robin Murphy
2019-02-04 17:09 ` [PATCH 3/5] perf/arm-ccn: Fix CPU hotplug race avoidance Robin Murphy
2019-02-05 11:38   ` Suzuki K Poulose
2019-02-10 20:44   ` Thomas Gleixner
2019-02-04 17:09 ` [PATCH 4/5] cpu/hotplug: Add locked variant of cpuhp_state_add_instance() Robin Murphy
2019-02-04 17:09 ` [PATCH 5/5] perf/arm_dsu: Fix CPU hotplug races Robin Murphy
2019-02-05 11:40   ` Suzuki K Poulose
2019-02-05 13:04     ` Robin Murphy [this message]
2019-02-05  9:25 ` [PATCH 0/5] Fix Arm system PMU hotplug issues Mark Rutland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84bdba44-9ce1-906c-0575-f931435de886@arm.com \
    --to=robin.murphy@arm.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=peterz@infradead.org \
    --cc=suzuki.poulose@arm.com \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).