]> www.infradead.org Git - users/hch/configfs.git/commitdiff
sysfs/cpu: Make crash_hotplug attribute world-readable
authorPetr Tesarik <ptesarik@suse.com>
Thu, 11 Jul 2024 10:34:09 +0000 (12:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Jul 2024 09:00:58 +0000 (11:00 +0200)
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 <ptesarik@suse.com>
Acked-by: Baoquan He <bhe@redhat.com>
Acked-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Link: https://lore.kernel.org/r/20240711103409.319673-1-petr.tesarik@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/cpu.c

index 4901fbfca32688067e4b18d29d38bdb96dd7999c..9a77301640b0039996790dcd52907d92393ceeba 100644 (file)
@@ -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)