diff options
author | Geliang Tang <geliangtang@gmail.com> | 2020-11-10 11:01:43 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-12 07:54:15 -0800 |
commit | 724d06b437bba9faf280842a983e69c04f244767 (patch) | |
tree | 8e483985157e75a83175bd1579774ec82fda731d /block | |
parent | e545f86573937142b8a90bd65d476b9f001088cf (diff) | |
download | linux-724d06b437bba9faf280842a983e69c04f244767.tar.bz2 |
mptcp: fix static checker warnings in mptcp_pm_add_timer
Fix the following Smatch complaint:
net/mptcp/pm_netlink.c:213 mptcp_pm_add_timer()
warn: variable dereferenced before check 'msk' (see line 208)
net/mptcp/pm_netlink.c
207 struct mptcp_sock *msk = entry->sock;
208 struct sock *sk = (struct sock *)msk;
209 struct net *net = sock_net(sk);
^^
"msk" dereferenced here.
210
211 pr_debug("msk=%p", msk);
212
213 if (!msk)
^^^^
Too late.
214 return;
215
Fixes: 93f323b9cccc ("mptcp: add a new sysctl add_addr_timeout")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Link: https://lore.kernel.org/r/078a2ef5bdc4e3b2c25ef852461692001f426495.1604976945.git.geliangtang@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions