diff options
author | Cong Wang <xiyou.wangcong@gmail.com> | 2018-04-19 21:25:38 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-22 20:55:03 +0200 |
commit | b905ef9ab90115d001c1658259af4b1c65088779 (patch) | |
tree | 2eba79255f0ba6a79192f88ee1a3c6caf7326cf9 /include | |
parent | l2tp: fix {pppol2tp, l2tp_dfs}_seq_stop() in case of seq_file overflow (diff) | |
download | linux-b905ef9ab90115d001c1658259af4b1c65088779.tar.xz linux-b905ef9ab90115d001c1658259af4b1c65088779.zip |
llc: delete timers synchronously in llc_sk_free()
The connection timers of an llc sock could be still flying
after we delete them in llc_sk_free(), and even possibly
after we free the sock. We could just wait synchronously
here in case of troubles.
Note, I leave other call paths as they are, since they may
not have to wait, at least we can change them to synchronously
when needed.
Also, move the code to net/llc/llc_conn.c, which is apparently
a better place.
Reported-by: <syzbot+f922284c18ea23a8e457@syzkaller.appspotmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/llc_conn.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/llc_conn.h b/include/net/llc_conn.h index 5c40f118c0fa..df528a623548 100644 --- a/include/net/llc_conn.h +++ b/include/net/llc_conn.h @@ -97,6 +97,7 @@ static __inline__ char llc_backlog_type(struct sk_buff *skb) struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority, struct proto *prot, int kern); +void llc_sk_stop_all_timers(struct sock *sk, bool sync); void llc_sk_free(struct sock *sk); void llc_sk_reset(struct sock *sk); |