summaryrefslogtreecommitdiff
path: root/drivers/dma-buf
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-18 15:47:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-18 16:06:22 +0200
commitca9d081b49cc225627aa73feb9284b7ffc190df5 (patch)
tree78122a093d0624ac544cfc75c48858797bcb6337 /drivers/dma-buf
parent862d8312eed994a8a9af7aa8e9e15456183b10a7 (diff)
zram: fix up permission for the hot_add sysfs file
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>
Diffstat (limited to 'drivers/dma-buf')
0 files changed, 0 insertions, 0 deletions