mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: robin.murphy@arm.com, Hongbo Yao <andy.xu@hj-micro.com>
Cc: catalin.marinas@arm.com, kernel-team@android.com,
	Will Deacon <will@kernel.org>,
	mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, allen.wang@hj-micro.com,
	peter.du@hj-micro.com
Subject: Re: [PATCH v3] perf: arm-ni: Unregister PMUs on probe failure
Date: Thu, 17 Apr 2025 15:27:24 +0100	[thread overview]
Message-ID: <174489608350.2694212.5228130661148329110.b4-ty@kernel.org> (raw)
In-Reply-To: <20250403070918.4153839-1-andy.xu@hj-micro.com>

On Thu, 03 Apr 2025 15:09:18 +0800, Hongbo Yao wrote:
> When a resource allocation fails in one clock domain of an NI device,
> we need to properly roll back all previously registered perf PMUs in
> other clock domains of the same device.
> 
> Otherwise, it can lead to kernel panics.
> 
> Calling arm_ni_init+0x0/0xff8 [arm_ni] @ 2374
> arm-ni ARMHCB70:00: Failed to request PMU region 0x1f3c13000
> arm-ni ARMHCB70:00: probe with driver arm-ni failed with error -16
> list_add corruption: next->prev should be prev (fffffd01e9698a18),
> but was 0000000000000000. (next=ffff10001a0decc8).
> pstate: 6340009 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
> pc : list_add_valid_or_report+0x7c/0xb8
> lr : list_add_valid_or_report+0x7c/0xb8
> Call trace:
>  __list_add_valid_or_report+0x7c/0xb8
>  perf_pmu_register+0x22c/0x3a0
>  arm_ni_probe+0x554/0x70c [arm_ni]
>  platform_probe+0x70/0xe8
>  really_probe+0xc6/0x4d8
>  driver_probe_device+0x48/0x170
>  __driver_attach+0x8e/0x1c0
>  bus_for_each_dev+0x64/0xf0
>  driver_add+0x138/0x260
>  bus_add_driver+0x68/0x138
>  __platform_driver_register+0x2c/0x40
>  arm_ni_init+0x14/0x2a [arm_ni]
>  do_init_module+0x36/0x298
> ---[ end trace 0000000000000000 ]---
> Kernel panic - not syncing: Oops - BUG: Fatal exception
> SMP: stopping secondary CPUs
> 
> [...]

Applied to will (for-next/perf), thanks!

[1/1] perf: arm-ni: Unregister PMUs on probe failure
      https://git.kernel.org/will/c/7f57afde6a44

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

      parent reply	other threads:[~2025-04-17 14:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-03  7:09 Hongbo Yao
2025-04-03 10:31 ` Robin Murphy
2025-04-17 14:27 ` Will Deacon [this message]

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=174489608350.2694212.5228130661148329110.b4-ty@kernel.org \
    --to=will@kernel.org \
    --cc=allen.wang@hj-micro.com \
    --cc=andy.xu@hj-micro.com \
    --cc=catalin.marinas@arm.com \
    --cc=kernel-team@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=peter.du@hj-micro.com \
    --cc=robin.murphy@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

all inboxes | Powered by JetHome®