net: Only store high 16 bits of kernel generated filter priorities
Subsystems (3)
PATCH 1/1 net: Only store high 16 bits of kernel generated filter priorities
The kernel should only be using the high 16 bits of a kernel generated priority. Filter priorities in all other cases only use the upper 16 bits of the u32 'prio' field of 'struct tcf_proto', but when the kernel generates the priority of a filter is saves all 32 bits which can result in incorrect lookup failures when a filter needs to be deleted or modified.
---
net/sched/cls_api.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/sched/cls_api.c +1 -1
@@ -254,7 +254,7 @@ replay: } tp->ops = tp_ops; tp->protocol = protocol; - tp->prio = nprio ? :tcf_auto_prio (*back); + tp->prio = nprio ? :TC_H_MAJ (tcf_auto_prio (*back)); tp->q = q; tp->classify = tp_ops->classify; tp->classid = parent;
From: Robert Love <[email protected]>
Date: Sat, 02 May 2009 13:43:20 -0700
Quoted 8 lines
The kernel should only be using the high 16 bits of a kernel generated priority. Filter priorities in all other cases only use the upper 16 bits of the u32 'prio' field of 'struct
tcf_proto', but when the kernel generates the priority of a filter is saves all 32 bits which can result in incorrect lookup failures when a filter needs to be deleted or modified.Signed-off-by Robert Love <[email protected]>
Applied, thanks Robert!