[PATCH RFC 21/23] ALSA: info: let procfs copy in writes

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Nov 3 07:19:09 PST 2026


> Implement ->proc_write_buf() for data and text entries so procfs copies
> in what is written before it pins the entry.
> 
> Data entries take writes a page at a time with PROC_ENTRY_SHORT_WRITES.
> They used to get the whole write at once. ->write() of struct
> snd_info_entry_ops gets the kernel copy and opl4, its only user, writes
> it to the sample memory without bouncing it through a vmalloc() buffer
> of its own.
> 
> Text entries take up to SND_INFO_TEXT_WRITE_MAX bytes at once like
> before. A single write that is larger fails with -EINVAL from procfs
> instead of -EIO now.
> 
> Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261102-work-procfs-drivers-v1-0-a994bd4d3b1a@kernel.org?part=21




More information about the kexec mailing list