[PATCH RESEND v2 14/26] scsi: sg: let procfs copy in writes

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Nov 5 11:49:34 PST 2026


> Implement ->proc_write_buf() for allow_dio and def_reserved_size so
> procfs copies in what is written before it pins the entry, and parse
> the number from that copy.
> 
> kstrtoul_from_user() looked at the first 66 bytes of whatever was
> written. Now the whole write is parsed, and anything larger than
> PAGE_SIZE - 1 bytes fails with -EINVAL from procfs before the
> capability check.
> 
> 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/20261104-work-procfs-drivers-v2-0-245e54e87116@kernel.org?part=14




More information about the kexec mailing list