Re: [PATCH v2 3/4] sysctl: Disallow partial updates for erroneous sysctl vectors

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 <cwfpl5h47km6f35m5k7wa2pj3elciaax6i3nmetxcgws66qewq@fzygztolxed4>
On Sat, Aug 15, 2026 at 05:05:26PM +0100, Bradley Morgan wrote:
> commit_conv_vec() writes the elements one by one, so a reader can
> still see a mix of old and new values while the loop runs. Same as
> before this series, so no regression, but the changelog could say
> this doesn't make the write atomic either. Otherwise someone later
> will expect the vector to change all at once.

Seems reasonable: here is what I added to the commit message:


"
... This (The staging vector) does **not** make the write atomic as a reader
can still see a partially updated vector.

...
"

Best

Joel

> 
> The copy is limited by table->maxlen and only vectors pay for it.
> 
> Fine by me.
> 
> Reviewed-by: Bradley Morgan <[email protected]>
> Thanks!
signature.asc (application/pgp-signature, 659 B)
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmqDEA8ACgkQupfNUreW
QU9zgQv/bnQ92wPIe9bSeDUP0FWKwpDTbtxn/2wHV3tzqIJArmIZzkr02Cy6qsxj
/De7twF6hou7L9+YQyf777GU45woG89gvPpGLs/uJ52Jlv/sqEObSzxXJNbeWWWs
Wozys0TZZsOAkBLwwvcBky4nw6EqSodJE+c1tFfAJFkr/8JeOk8kG0mPaWRP5KeK
+DlxLVpQTySKxVB1i/cZhNmeecG6FioVeMChDtLSKUvE96NSI/D1fngEd4I1aFTJ
8W4Ha6oeALfo2iZvSA0/cM8gMVW7M+dhY5RtIMzF8ejMNSOs2BGUXUh8rxP5cRbr
XXrDhO5SJbJsOnfj0HpAj/gQGJQMh+jmUSaCFp54251TyMaIpNH1WqxgZNmA68pA
s+qOTeRjPSVTHluyR2aArr24sKaO46j2NXGO2uS3qiNAslPE1nQHfAUX5pQQBAPV
dvsCclzMGntqE4wT8YWRI1wd37XdjtQVLHi55avd28i/lOSPjwfkmxpZBgmY9hTH
bD+zj0To
=AzpY
-----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.