]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: sched: track device in tcf_block_get/put_ext() only for clsact binder types
authorJiri Pirko <jiri@nvidia.com>
Fri, 12 Jan 2024 11:39:30 +0000 (12:39 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Jan 2024 15:49:15 +0000 (15:49 +0000)
commite18405d0be8001fa4c5f9e61471f6ffd59c7a1b3
treeb5764a0a83fbe32e44874dcb364dae6121fe9415
parent482521d8e0c6520429478aa6866cd44128b33d5d
net: sched: track device in tcf_block_get/put_ext() only for clsact binder types

Clsact/ingress qdisc is not the only one using shared block,
red is also using it. The device tracking was originally introduced
by commit 913b47d3424e ("net/sched: Introduce tc block netdev
tracking infra") for clsact/ingress only. Commit 94e2557d086a ("net:
sched: move block device tracking into tcf_block_get/put_ext()")
mistakenly enabled that for red as well.

Fix that by adding a check for the binder type being clsact when adding
device to the block->ports xarray.

Reported-by: Ido Schimmel <idosch@idosch.org>
Closes: https://lore.kernel.org/all/ZZ6JE0odnu1lLPtu@shredder/
Fixes: 94e2557d086a ("net: sched: move block device tracking into tcf_block_get/put_ext()")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Tested-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c