[PATCH RFC 22/23] ALSA: info: let procfs copy out reads of data entries
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Tue Nov 3 07:19:12 PST 2026
> Implement ->proc_read_buf() for data entries so procfs copies what is
> read to userspace after it unpinned the entry. ->read() of struct
> snd_info_entry_ops fills procfs' buffer now. opl4 reads the sample
> memory into it without a vmalloc() buffer of its own, gus, cs46xx,
> emu10k1, scarlett2, cs4281 and mixart copy into it instead of to
> userspace. The driver guide still told raw callbacks to copy to and from
> userspace, so update its example as well. Data entries ask for
> PROC_ENTRY_FULL_READS so that reading all of an entry at once keeps
> working. A read that faults on its buffer in a later piece returns the
> pieces before it now instead of failing with -EFAULT.
>
> Unbinding a card then no longer waits for a reader that faults on its
> buffer.
>
> 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=22
More information about the kexec
mailing list