All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] Re: [MPTCP][PATCH net] mptcp: fix static checker warnings in mptcp_pm_add_timer
@ 2020-11-09 11:17 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2020-11-09 11:17 UTC (permalink / raw)
  To: mptcp 

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

On Mon, Nov 09, 2020 at 06:13:12PM +0800, Geliang Tang wrote:
> 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: 00cfd77b9063 ("mptcp: retransmit ADD_ADDR when timeout")
> Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
> Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>

Reviewed-by: Dan Carpenter <dan.carpenter(a)oracle.com>

I don't know how mptcp patches are applied, but I think you need to CC
netdev and the other maintainers.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-09 11:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-09 11:17 [MPTCP] Re: [MPTCP][PATCH net] mptcp: fix static checker warnings in mptcp_pm_add_timer Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.