android_kernel_samsung_msm8976/net/sched
Roman Mashak 39d14034b6 net sched actions: decrement module reference count after table flush.
commit edb9d1bff4bbe19b8ae0e71b1f38732591a9eeb2 upstream.

When tc actions are loaded as a module and no actions have been installed,
flushing them would result in actions removed from the memory, but modules
reference count not being decremented, so that the modules would not be
unloaded.

Following is example with GACT action:

% sudo modprobe act_gact
% lsmod
Module                  Size  Used by
act_gact               16384  0
%
% sudo tc actions ls action gact
%
% sudo tc actions flush action gact
% lsmod
Module                  Size  Used by
act_gact               16384  1
% sudo tc actions flush action gact
% lsmod
Module                  Size  Used by
act_gact               16384  2
% sudo rmmod act_gact
rmmod: ERROR: Module act_gact is in use
....

After the fix:
% lsmod
Module                  Size  Used by
act_gact               16384  0
%
% sudo tc actions add action pass index 1
% sudo tc actions add action pass index 2
% sudo tc actions add action pass index 3
% lsmod
Module                  Size  Used by
act_gact               16384  3
%
% sudo tc actions flush action gact
% lsmod
Module                  Size  Used by
act_gact               16384  0
%
% sudo tc actions flush action gact
% lsmod
Module                  Size  Used by
act_gact               16384  0
% sudo rmmod act_gact
% lsmod
Module                  Size  Used by
%

Fixes: f97017cdef ("net-sched: Fix actions flushing")
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2019-07-27 21:43:13 +02:00
..
Kconfig
Makefile
act_api.c net sched actions: decrement module reference count after table flush. 2019-07-27 21:43:13 +02:00
act_csum.c
act_gact.c
act_ipt.c
act_mirred.c
act_nat.c
act_pedit.c
act_police.c
act_simple.c
act_skbedit.c
cls_api.c net, sched: fix soft lockup in tc_classify 2019-07-27 21:42:56 +02:00
cls_basic.c
cls_cgroup.c
cls_flow.c
cls_fw.c
cls_route.c
cls_rsvp.c
cls_rsvp.h
cls_rsvp6.c
cls_tcindex.c
cls_u32.c
em_canid.c
em_cmp.c
em_ipset.c
em_meta.c net/sched: em_meta: Fix 'meta vlan' to correctly recognize zero VID frames 2019-07-27 21:43:07 +02:00
em_nbyte.c
em_text.c
em_u32.c
ematch.c
sch_api.c This is the 3.10.84 stable release 2015-09-30 13:25:40 +05:30
sch_atm.c
sch_blackhole.c
sch_cbq.c
sch_choke.c
sch_codel.c
sch_drr.c
sch_dsmark.c
sch_fifo.c
sch_fq_codel.c
sch_generic.c
sch_gred.c
sch_hfsc.c
sch_htb.c
sch_ingress.c
sch_mq.c
sch_mqprio.c
sch_multiq.c
sch_netem.c
sch_plug.c
sch_prio.c
sch_qfq.c
sch_red.c
sch_sfb.c
sch_sfq.c
sch_tbf.c
sch_teql.c