From: WANG Cong Date: Tue, 7 Oct 2014 00:21:54 +0000 (-0700) Subject: net_sched: copy exts->type in tcf_exts_change() X-Git-Tag: v3.16.6~12 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=90bca55d47539bee593fa42ea659bd6e24e98ab4;p=unionfs-3.17.y.git net_sched: copy exts->type in tcf_exts_change() [ Upstream commit 5301e3e117d88ef0967ce278912e54757f1a31a2 ] We need to copy exts->type when committing the change, otherwise it would be always 0. This is a quick fix for -net and -stable, for net-next tcf_exts will be removed. Fixes: commit 33be627159913b094bb578e83 ("net_sched: act: use standard struct list_head") Reported-by: Jamal Hadi Salim Cc: Jamal Hadi Salim Cc: John Fastabend Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 45527e6b52db..3b2617aa6bcd 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -549,6 +549,7 @@ void tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst, tcf_tree_lock(tp); list_splice_init(&dst->actions, &tmp); list_splice(&src->actions, &dst->actions); + dst->type = src->type; tcf_tree_unlock(tp); tcf_action_destroy(&tmp, TCA_ACT_UNBIND); #endif