From: John Garry <john.g.garry@oracle.com>
To: hyunki00.koo@samsung.com, joro@8bytes.org, will@kernel.org,
mst@redhat.com, jasowang@redhat.com, robin.murphy@arm.com
Cc: xieyongji@bytedance.com, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org, linuxarm@huawei.com,
taeyang.choi@samsung.com, bumyong.lee@samsung.com,
iommu@lists.linux.dev
Subject: Re: Please backport 32e92d9f6f87 ("iommu/iova: Separate out rcache init") to linux-5.15.y
Date: Mon, 2 Jun 2025 10:46:45 +0100 [thread overview]
Message-ID: <0a41252f-7833-4e14-a246-c2471731ef97@oracle.com> (raw)
In-Reply-To: <000d01dbceea$8bfec3c0$a3fc4b40$@samsung.com>
On 27/05/2025 10:34, hyunki00.koo@samsung.com wrote:
- old addresses
> Please backport 32e92d9f6f87 ("iommu/iova: Separate out rcache init") to
> linux-5.15.y
If you want some work done, then you generally have to do it yourself or
pay someone to do it. Or report a real problem, so someone who cares helps.
>
> Commit de53fd7aedb1 32e92d9f6f87 ("iommu/iova: Separate out rcache init")
> fixes below issue.
> This should be applied to all stable kernels that applied commit.
>
> Issue
> =====
>
> As you metioned in commit message, fails in init_iova_rcaches() are not
> handled safely,
> and a problem actually occurs.
>
> By the context of the 2 lines below in linux-5.15.y,
> callback of cpuhp may be called before the percpu variable is allocated.
>
> cpuhp_state_add_instance_nocalls(CPUHP_IOMMU_IOVA_DEAD, &iovad->cpuhp_dead);
> init_iova_rcaches(iovad);
>
> The problem occurred in the Linux kernel version 5.15.144, if
> remove_cpu(cpu) is called between 2 line.
So this some artificial test you create to race cpu hotplug with
adding/removing a device? Or something like that?
> The following is the panic log:
> [ 2.097125][ T1] Unable to handle kernel paging request at virtual
> address ffffffcb74a6b004
> ...
> [ 2.097226][ T1] Call trace:
> [ 2.097323][ T1] do_raw_spin_lock+0x1c/0x12c
> [ 2.098469][ T1] _raw_spin_lock_irqsave+0x30/0x60
> [ 2.118152][ T1] free_cpu_cached_iovas+0x50/0xb0
> [ 2.118307][ T1] iova_cpuhp_dead+0x1c/0x30
> [ 2.119447][ T1] cpuhp_invoke_callback+0x2d8/0x5b0
> [ 2.119608][ T1] _cpu_down+0x17c/0x4a0
> [ 2.139216][ T1] cpu_device_down+0x44/0x70
> [ 2.139353][ T1] cpu_subsys_offline+0x10/0x20
> [ 2.140503][ T1] device_offline+0xf4/0x130
> [ 2.140640][ T1] remove_cpu+0x24/0x40
> [ 2.160305][ T1] init_iova_domain+0xec/0x1f0
>
> Here is my modification based on the top of the tree of linux-5.15.y
>
next prev parent reply other threads:[~2025-06-02 9:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250527093429epcas2p1ae70ad7304305bf547ce34a70f9badc6@epcas2p1.samsung.com>
2025-05-27 9:34 ` Please backport 32e92d9f6f87 ("iommu/iova: Separate out rcache init") to linux-5.15.y hyunki00.koo
2025-06-02 9:46 ` John Garry [this message]
[not found] <CGME20250527094258epcas2p148075e4a9a1ca860feed842f9c7ce61e@epcas2p1.samsung.com>
2025-05-27 9:42 ` hyunki00.koo
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=0a41252f-7833-4e14-a246-c2471731ef97@oracle.com \
--to=john.g.garry@oracle.com \
--cc=bumyong.lee@samsung.com \
--cc=hyunki00.koo@samsung.com \
--cc=iommu@lists.linux.dev \
--cc=jasowang@redhat.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mst@redhat.com \
--cc=robin.murphy@arm.com \
--cc=taeyang.choi@samsung.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=will@kernel.org \
--cc=xieyongji@bytedance.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.