]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: shaper: flip the polarity of the valid flag
authorJakub Kicinski <kuba@kernel.org>
Sun, 10 May 2026 19:28:55 +0000 (12:28 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 12 May 2026 14:14:59 +0000 (16:14 +0200)
commit7cee43fcb0c3f71441d2faaa8c2202b6a88b6bef
tree90a109f2f21552dea94a3a3854bf6fffe8026172
parent36a8d04a8293afcb9304cf0cd3741f67698f2a1a
net: shaper: flip the polarity of the valid flag

The usual way of inserting entries which are not yet fully ready
into XArray is to have a VALID flag. The shaper code has a NOT_VALID
flag. Since XArray code does not let us create entries with marks
already set - the creation of entries is currently not atomic.

Flip the polarity of the VALID flag. This closes the tiny race
in net_shaper_pre_insert() of entries being created without
the NOT_VALID flag.

Fixes: 93954b40f6a4 ("net-shapers: implement NL set and delete operations")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20260510192904.3987113-2-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/shaper/shaper.c