From e777798e67d9ba46cf56ad49919c1e86c5ee3213 Mon Sep 17 00:00:00 2001 From: Petr Tesarik Date: Thu, 11 Jul 2024 12:34:09 +0200 Subject: sysfs/cpu: Make crash_hotplug attribute world-readable There is no reason to restrict access to this attribute, as it merely reports whether crash elfcorehdr is automatically updated on CPU hot plug/unplug and/or online/offline events. Note that since commit 79365026f8694 ("crash: add a new kexec flag for hotplug support"), this maps to the same flag which is world-accessible through /sys/devices/system/memory/crash_hotplug. Signed-off-by: Petr Tesarik Acked-by: Baoquan He Acked-by: Sourabh Jain Link: https://lore.kernel.org/r/20240711103409.319673-1-petr.tesarik@suse.com Signed-off-by: Greg Kroah-Hartman --- drivers/base/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/base/cpu.c') diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 4901fbfca326..9a77301640b0 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -308,7 +308,7 @@ static ssize_t crash_hotplug_show(struct device *dev, { return sysfs_emit(buf, "%d\n", crash_check_hotplug_support()); } -static DEVICE_ATTR_ADMIN_RO(crash_hotplug); +static DEVICE_ATTR_RO(crash_hotplug); #endif static void cpu_device_release(struct device *dev) -- cgit v1.2.3-70-g09d2