llc: delete timers synchronously in llc_sk_free()
authorCong Wang <xiyou.wangcong@gmail.com>
Thu, 19 Apr 2018 19:25:38 +0000 (12:25 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Apr 2018 09:33:11 +0000 (11:33 +0200)
commitcb225e80c9a3364c43ae4219da05ebb5a4b86c39
tree0f9110f690748fe7acdc84048a787fca41988b98
parent15efa783286c6f4fb3deeff215c7fb33667b40a9
llc: delete timers synchronously in llc_sk_free()

[ Upstream commit b905ef9ab90115d001c1658259af4b1c65088779 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/llc_conn.h
net/llc/llc_c_ac.c
net/llc/llc_conn.c