summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_hfsc.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2023-08-29 07:44:56 +0200
committerPaolo Abeni <pabeni@redhat.com>2023-08-29 07:44:56 +0200
commitc873512ef3a39cc1a605b7a5ff2ad0a33d619aa8 (patch)
tree8db2b6a6ef0a08f6e9d78dde00bf44bf60d09d54 /net/sched/sch_hfsc.c
parentnet: ethernet: mtk_wed: minor change in wed_{tx,rx}info_show (diff)
parentr8169: fix ASPM-related issues on a number of systems with NIC version from R... (diff)
downloadlinux-c873512ef3a39cc1a605b7a5ff2ad0a33d619aa8.tar.xz
linux-c873512ef3a39cc1a605b7a5ff2ad0a33d619aa8.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Merge in late fixes to prepare for the 6.6 net-next PR. No conflicts. Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/sched/sch_hfsc.c')
-rw-r--r--net/sched/sch_hfsc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 98805303218d..3554085bc2be 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -1011,6 +1011,10 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
if (parent == NULL)
return -ENOENT;
}
+ if (!(parent->cl_flags & HFSC_FSC) && parent != &q->root) {
+ NL_SET_ERR_MSG(extack, "Invalid parent - parent class must have FSC");
+ return -EINVAL;
+ }
if (classid == 0 || TC_H_MAJ(classid ^ sch->handle) != 0)
return -EINVAL;