All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter at oracle.com>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: [MPTCP][PATCH net] mptcp: fix static checker warnings in mptcp_pm_add_timer
Date: Mon, 09 Nov 2020 14:17:06 +0300	[thread overview]
Message-ID: <20201109111706.GL18329@kadam> (raw)
In-Reply-To: 81e64bc4a6891edcff237ef76f7c10ebb2873957.1604916744.git.geliangtang@gmail.com

[-- 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

                 reply	other threads:[~2020-11-09 11:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201109111706.GL18329@kadam \
    --to=unknown@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.