]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: fix a missing refcnt in tcindex_init()
authorCong Wang <xiyou.wangcong@gmail.com>
Fri, 3 Apr 2020 03:58:51 +0000 (20:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Apr 2020 23:00:08 +0000 (16:00 -0700)
commit2fd448e1f97c82d5eafa31627c72cd6de0bd7962
tree368d450c2049ba3b8f99e712940356130a143d28
parenteb58406e0074efa30ae026fbe7cd526e8c1cc786
net_sched: fix a missing refcnt in tcindex_init()

The initial refcnt of struct tcindex_data should be 1,
it is clear that I forgot to set it to 1 in tcindex_init().
This leads to a dec-after-zero warning.

Reported-by: syzbot+8325e509a1bf83ec741d@syzkaller.appspotmail.com
Fixes: e2ee1fd9c1c3 ("net_sched: add a temporary refcnt for struct tcindex_data")
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Cc: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_tcindex.c