]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net_sched: sch_sfq: use a temporary work area for validating configuration
authorOctavian Purdila <tavip@google.com>
Mon, 7 Apr 2025 20:24:07 +0000 (13:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:09 +0000 (10:45 +0200)
commit00d44fe29e75dae7bec2ade7f5839e38cdaf70e0
tree5c9d573486762852f368cde40340d7151af61231
parenta8008b9758904aa7bfcbe187f5907e6f28a3d216
net_sched: sch_sfq: use a temporary work area for validating configuration

[ Upstream commit 8c0cea59d40cf6dd13c2950437631dd614fbade6 ]

Many configuration parameters have influence on others (e.g. divisor
-> flows -> limit, depth -> limit) and so it is difficult to correctly
do all of the validation before applying the configuration. And if a
validation error is detected late it is difficult to roll back a
partially applied configuration.

To avoid these issues use a temporary work area to update and validate
the configuration and only then apply the configuration to the
internal state.

Signed-off-by: Octavian Purdila <tavip@google.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: b3bf8f63e617 ("net_sched: sch_sfq: move the limit validation")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sched/sch_sfq.c