]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: core: sysfs: Correct sysfs attributes access rights
authorDamien Le Moal <dlemoal@kernel.org>
Mon, 28 Jul 2025 04:17:00 +0000 (13:17 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Sep 2025 13:30:19 +0000 (15:30 +0200)
commit43662b846c7a22ffc368502ab39e8caaaf4d111e
tree720b6624076f7012c386667082f9bdf0f91ebf16
parent28c8fb7ae2ad27d81c8de3c4fe608c509f6a18aa
scsi: core: sysfs: Correct sysfs attributes access rights

[ Upstream commit a2f54ff15c3bdc0132e20aae041607e2320dbd73 ]

The SCSI sysfs attributes "supported_mode" and "active_mode" do not
define a store method and thus cannot be modified.  Correct the
DEVICE_ATTR() call for these two attributes to not include S_IWUSR to
allow write access as they are read-only.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250728041700.76660-1-dlemoal@kernel.org
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Johannes Thumshin <johannes.thumshirn@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/scsi_sysfs.c