]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net_sched: initialize net pointer inside tcf_exts_init()
authorCong Wang <xiyou.wangcong@gmail.com>
Wed, 15 May 2019 13:02:00 +0000 (15:02 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 2 Jul 2019 12:12:44 +0000 (14:12 +0200)
commitfb6ad63b65dfa915e607ad5afe7ce611d1c04e98
tree24204b3bf8290cf1984cf458a74bf34a32c7d19e
parent11f29af1e8270078dec877cb4a35eea68c002b4d
net_sched: initialize net pointer inside tcf_exts_init()

BugLink: https://bugs.launchpad.net/bugs/1825942
For tcindex filter, it is too late to initialize the
net pointer in tcf_exts_validate(), as tcf_exts_get_net()
requires a non-NULL net pointer. We can just move its
initialization into tcf_exts_init(), which just requires
an additional parameter.

This makes the code in tcindex_alloc_perfect_hash()
prettier.

Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 14215108a1fd7e002c0a1f9faf8fbaf41fdda50d)
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
13 files changed:
include/net/pkt_cls.h
net/sched/cls_api.c
net/sched/cls_basic.c
net/sched/cls_bpf.c
net/sched/cls_cgroup.c
net/sched/cls_flow.c
net/sched/cls_flower.c
net/sched/cls_fw.c
net/sched/cls_matchall.c
net/sched/cls_route.c
net/sched/cls_rsvp.h
net/sched/cls_tcindex.c
net/sched/cls_u32.c