Re: [PATCH] staging: greybus: audio_manager_module: make module attributes read-only
From: Greg Kroah-Hartman
Date: Fri Dec 04 2026 - 16:53:17 EST
On Fri, Dec 04, 2026 at 06:47:07PM -0300, Vinícius Bruno wrote:
> The name, vid, pid, intf_id, ip_devices and op_devices attributes are
> declared with mode 0664, but none of them provides a store() callback.
>
> As a result, the files appear writable to their owner and group, and a
> write passes the permission check only to fail with -EIO in
> gb_audio_module_attr_store(), since attribute->store is NULL.
>
> Set the mode to 0444 so the permissions reflect that these attributes
> are read-only, and writes are rejected up front with -EACCES.
>
> This changes the file mode shown for these attributes, but no attribute
> was writable before, so no working userspace interface is lost.
>
> Compile-tested only with W=1; not tested on Greybus hardware.
>
> The commit message was drafted with the help of an AI assistant
> (Claude) and reviewed by the author.
Please read:
https://lore.kernel.org/r/2026080354-skater-urgent-31b2@gregkh