Re: [PATCH v2 1/4] sysctl: Split data conversion and file position handling

Joel Granados <[email protected]>
Newsgroups org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kvack.linux-mm
Message-ID <7xr5rzlyafbbqrenxoijnuux4mt4unu3vkffcvyjaufm64bfgm@itqpdduljg56>
On Sat, Aug 15, 2026 at 05:04:32PM +0100, Bradley Morgan wrote:
> >Rename function to prov_vec (from do_proc_vec).
> 
> s/prov_vec/proc_vec/, the diff renames it to proc_vec.
> 
> Also the SIZE_MAX comment in proc_vec() only talks about the no
> parsed element case, but after 3/4 a kmemdup failure leaves
> left_nbyte unset too (it goes to out before buf_left_final gets
> written). So the sentinel covers -ENOMEM as well, a line saying so
> would help.
> 
> The split itself is fine, so with the typo fixed:

This comment is more about why it is OK to use SIZE_MAX. The case where
kmemdup fails falls into the "no elements parsed".

Thx for the review.

> 
> Reviewed-by: Bradley Morgan <[email protected]>
> Thanks!
signature.asc (application/pgp-signature, 659 B)
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmqDDdsACgkQupfNUreW
QU9DGwwAicS0Z0OGIyVckHI7brK9mvqaOD7w4chOv8WkeTLatBjaqFGWXkHQj0gG
M9VE1JaFkXvFbNf7PBvVN0+vFEZXhocsk9lapp35m/mVNCVIz5XW446pPHAKy03F
mkQQNNGFG8Ppv+X2l7nwwIqsOONNnAcrHp3stEeHHeICw85IPrOInrKL+o/nFP7J
J+Z9r6/JDm+u1PY0CYH9xOQjQZAlU9y5QiQrLoYCp6DYfWRVf5baQTIlhhWNxafU
Oe0Qwu70jWAvAkHLCbG7XOF5IoF/y9k4b99/P9AWXcYaMagw1VhGS3375O1zPv0O
m81C8Ef+y2IhRxMwoyphEr0aqKx/N5GQNjhkQQjGIj4MQh6KOxZYywmQ1+ONYXeR
jfxeJtN5pk2ROnUlQ6HQb/g9PmvLjOkAgKoevZNZ/TD/WOScgHj/LyPCxY/SB4K3
q9KQp6NeYVmSVI/mgOOI98EhUDIabAfsMqOnK0mAxwOm5PrVRWFwLRjd64kVfqXi
5bSZC63m
=ZNXh
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.