Re: [PATCH] scsi: Correct sysfs attributes access rights

Damien Le Moal
2025-07-28T09:54:55Z

On 7/28/25 6:40 PM, John Garry wrote:
> On 28/07/2025 05:17, Damien Le Moal wrote:
>> 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>
>
> Reviewed-by: John Garry <john.g.garry@oracle.com>
>
> Note that class_attr_store() returns -EIO for no store method. Does the same
> happen after this change?

The regular Permission Denied (-EPERM) is returned.
Do you think that is a problem ?

--
Damien Le Moal
Western Digital Research