Go to file
Mark Langsdorf 752bf10430 zram: fix up permission for the hot_add sysfs file
JIRA: https://issues.redhat.com/browse/RHEL-1023

commit ca9d081b49cc225627aa73feb9284b7ffc190df5
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Tue Apr 18 15:47:15 2023 +0200

Commit 75a2d4226b53 ("driver core: class: mark the struct class for
sysfs callbacks as constant") changed the attribute to use
CLASS_ATTR_RO() which changed the permission from 0400 to 0444.  But
this atribute is "special" in that reading it modifies the system state,
so it MUST be set to 0400 so that only root processes can muck around
with it.

Fix this all up, AND document this so that I don't change it again in
3-4 years when I stumble across it and wonder why it's an open-coded
_ATTR() macro.

Reported-by: Denis Efremov <efremov@linux.com>
Fixes: 75a2d4226b53 ("driver core: class: mark the struct class for sysfs callbacks as constant")
Link: https://lore.kernel.org/r/2023041810-angelic-conical-52d8@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-11-01 11:12:32 -05:00
Documentation driver core: bus: mark the struct bus_type for sysfs callbacks as constant 2023-11-01 11:12:31 -05:00
LICENSES
arch driver core: class: mark the struct class for sysfs callbacks as constant 2023-11-01 11:12:32 -05:00
block driver core: class: remove module * from class_create() 2023-11-01 11:12:29 -05:00
certs KEYS: DigitalSignature link restriction 2023-05-27 08:41:17 +08:00
crypto Merge: update kernel drivers/char/random to upstream v6.2 2023-10-11 13:28:06 -04:00
drivers zram: fix up permission for the hot_add sysfs file 2023-11-01 11:12:32 -05:00
fs driver core: class: remove module * from class_create() 2023-11-01 11:12:29 -05:00
include driver core: class: mark the struct class for sysfs callbacks as constant 2023-11-01 11:12:32 -05:00
init driver core: remove CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2 2023-11-01 11:12:28 -05:00
io_uring blk-mq: remove hybrid polling 2023-09-18 15:56:06 +08:00
ipc ipc/shm: call underlying open/close vm_ops 2023-06-14 15:11:04 -06:00
kernel workqueue: move to use bus_get_dev_root() 2023-11-01 11:12:31 -05:00
lib kobject: make kobject_namespace take a const * 2023-10-23 10:35:56 -05:00
mm driver core: class: remove module * from class_create() 2023-11-01 11:12:29 -05:00
net driver core: class: remove module * from class_create() 2023-11-01 11:12:29 -05:00
redhat redhat/configs: disable the new fw_devlink option 2023-11-01 11:12:32 -05:00
samples driver core: class: remove module * from class_create() 2023-11-01 11:12:29 -05:00
scripts Merge: rcu: Backport upstream RCU commits up to v6.4 2023-10-17 09:01:45 -04:00
security keys: Fix linking a duplicate key to a keyring's assoc_array 2023-09-28 12:09:57 +10:00
sound driver core: class: remove module * from class_create() 2023-11-01 11:12:29 -05:00
tools driver core: class: remove module * from class_create() 2023-11-01 11:12:29 -05:00
usr kbuild: rename cmd_{bzip2,lzma,lzo,lz4,xzkern,zstd22} 2023-03-24 11:18:37 -04:00
virt Merge: KVM: aarch64: Rebase up to v6.5 (first round) 2023-10-11 13:28:06 -04:00
.clang-format PCI: Introduce pci_dev_for_each_resource() 2023-09-05 09:16:40 -06:00
.cocciconfig
.get_maintainer.conf get_maintainer.conf: Update with new location of RHMAINTAINERS 2022-01-19 14:26:16 -05:00
.get_maintainer.ignore
.gitattributes gitattributes: Remove unnecesary export restrictions 2021-08-30 10:50:35 -04:00
.gitignore kbuild: split the second line of *.mod into *.usyms 2023-03-24 17:06:53 -04:00
.gitlab-ci.yml CI: Remove unused kpet_tree_family 2023-10-06 13:50:15 +03:00
.mailmap mailmap: remove my redhat.com address from RHEL9's .mailmap file 2022-09-26 09:34:38 -04:00
COPYING
CREDITS
Kbuild
Kconfig Introduce CONFIG_RH_DISABLE_DEPRECATED 2021-08-30 10:50:55 -04:00
Kconfig.redhat Rename RH_DISABLE_DEPRECATED to RHEL_DIFFERENCES 2021-08-30 14:29:36 -04:00
MAINTAINERS Merge: ice: Enable DPLL support 2023-10-19 10:36:20 -04:00
Makefile arch: Introduce CONFIG_FUNCTION_ALIGNMENT 2023-06-30 20:00:00 -04:00
Makefile.rhelver [redhat] kernel-5.14.0-378.el9 2023-10-19 10:42:30 -04:00
README
makefile redhat: Change Makefile target names to dist- 2021-08-30 10:50:11 -04:00

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.