]> Git Repo - linux.git/commit
net_cls: fix unconfigured struct tcf_proto keeps chaining and avoid kernel panic...
authorMinoru Usui <[email protected]>
Tue, 2 Jun 2009 09:17:34 +0000 (02:17 -0700)
committerDavid S. Miller <[email protected]>
Tue, 2 Jun 2009 09:17:34 +0000 (02:17 -0700)
commit12186be7d2e1106cede1cc728526e3d7998cbe94
treea27e9c1cf720fbd31d67c27ea1426a0ae891733b
parentea30e11970a96cfe5e32c03a29332554573b4a10
net_cls: fix unconfigured struct tcf_proto keeps chaining and avoid kernel panic when we use cls_cgroup

This patch fixes a bug which unconfigured struct tcf_proto keeps
chaining in tc_ctl_tfilter(), and avoids kernel panic in
cls_cgroup_classify() when we use cls_cgroup.

When we execute 'tc filter add', tcf_proto is allocated, initialized
by classifier's init(), and chained.  After it's chained,
tc_ctl_tfilter() calls classifier's change().  When classifier's
change() fails, tc_ctl_tfilter() does not free and keeps tcf_proto.

In addition, cls_cgroup is initialized in change() not in init().  It
accesses unconfigured struct tcf_proto which is chained before
change(), then hits Oops.

Signed-off-by: Minoru Usui <[email protected]>
Signed-off-by: Jarek Poplawski <[email protected]>
Signed-off-by: Jamal Hadi Salim <[email protected]>
Tested-by: Minoru Usui <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/sched/cls_api.c
This page took 0.055076 seconds and 4 git commands to generate.