Re: [PATCH v7 0/6] platform/x86/amd/hsmp: Serialize the data plane against socket teardown
From: Ilpo Järvinen
Date: Fri Jul 24 2026 - 12:41:04 EST
On Thu, 23 Jul 2026 15:16:50 +0530, Muralidhara M K wrote:
> This series makes the AMD HSMP driver safe against concurrent probe/remove
> of its per-socket devices and against the data plane (open /dev/hsmp fds and
> hwmon/sysfs reads) racing socket teardown.
>
> The ACPI front-end binds one platform device per socket but shares a single
> socket array and a single /dev/hsmp misc device across them, while the data
> plane issues mailbox messages with no coordination with driver teardown.
> misc_deregister() does not drain already-open fds, so an in-flight message
> can touch a freed socket array or an unmapped mailbox on unbind.
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
FYI [if applicable to your patch], as per Linus' policy change, also
fixes are mostly routed through for-next unless the fix is for a
commit introduced in the most recent cycle or is clearly a regression
fix.
The list of commits applied:
[1/6] platform/x86/amd/hsmp: Serialize ACPI HSMP probe and remove with an rwsem
commit: 9c40a57258f6cb4109de46467966498e6f90ece6
[2/6] platform/x86/amd/hsmp: Map the metric table with ioremap() and unmap it explicitly
commit: 5622564fc6924c1607944f0ad22be81ed6fd38fb
[3/6] platform/x86/amd/hsmp: Serialize per-socket metric table reads with a mutex
commit: 8da4fedd5d1147d26e6ddbd7be2f1f5519df37dd
[4/6] platform/x86/amd/hsmp: Clear mdev.this_device on deregister
commit: 6bd243d5abd91ee7d7fa58a9ed60381da49b4b0a
[5/6] platform/x86/amd/hsmp: ACPI HSMP refcounted sockets and coordinated release
commit: 9b2895edb2b3ec1fb8a5adadb5305f6459151d38
[6/6] platform/x86/amd/hsmp: Serialize the data plane against socket teardown
commit: c7acedb2db001160b1ec41cdcc759dd664150666
--
i.