android_kernel_oneplus_msm8998/net/llc
Cong Wang 813fb06fe6 llc: use refcount_inc_not_zero() for llc_sap_find()
[ Upstream commit 0dcb82254d65f72333aa50ad626d1e9665ad093b ]

llc_sap_put() decreases the refcnt before deleting sap
from the global list. Therefore, there is a chance
llc_sap_find() could find a sap with zero refcnt
in this global list.

Close this race condition by checking if refcnt is zero
or not in llc_sap_find(), if it is zero then it is being
removed so we can just treat it as gone.

Reported-by: <syzbot+278893f3f7803871f7ce@syzkaller.appspotmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-22 07:48:35 +02:00
..
af_llc.c llc: better deal with too small mtu 2018-05-26 08:48:46 +02:00
Kconfig
llc_c_ac.c llc: properly handle dev_queue_xmit() return value 2018-05-30 07:49:06 +02:00
llc_c_ev.c
llc_c_st.c
llc_conn.c llc: properly handle dev_queue_xmit() return value 2018-05-30 07:49:06 +02:00
llc_core.c llc: use refcount_inc_not_zero() for llc_sap_find() 2018-08-22 07:48:35 +02:00
llc_if.c
llc_input.c
llc_output.c
llc_pdu.c
llc_proc.c
llc_s_ac.c
llc_s_ev.c
llc_s_st.c
llc_sap.c
llc_station.c
Makefile
sysctl_net_llc.c