[PATCH v6 13/14] driver core: Add device_hotplug_lock_assert_held() helper
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Mon Sep 21 02:18:31 PDT 2026
> crash_get_memory_ranges() walks memblock, which memory hotplug
> modifies under device_hotplug_lock. A caller that does not hold
> the lock can race with memblock_double_array() and iterate a freed
> regions array.
>
> Add device_hotplug_lock_assert_held() so that crash code can
> use it to catch such unsafe callers via lockdep.
>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael at kernel.org>
> Cc: Danilo Krummrich <dakr at kernel.org>
> Signed-off-by: Jinjie Ruan <ruanjinjie at huawei.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260921090450.807575-1-ruanjinjie@huawei.com?part=13
More information about the kexec
mailing list