netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Matthieu Baerts <matthieu.baerts@tessares.net>
Cc: Geliang Tang <geliangtang@gmail.com>,
	Mat Martineau <mathew.j.martineau@linux.intel.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, mptcp@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: Re: [MPTCP][PATCH net 1/2] mptcp: fix static checker warnings in mptcp_pm_add_timer
Date: Mon, 9 Nov 2020 21:34:19 +0300	[thread overview]
Message-ID: <20201109183419.GQ18329@kadam> (raw)
In-Reply-To: <009ea5da-8a44-3ea2-1b9f-a658a09f3396@tessares.net>

On Mon, Nov 09, 2020 at 05:28:54PM +0100, Matthieu Baerts wrote:
> Hi Geliang, Dan,
> 
> On 09/11/2020 14:59, Geliang Tang wrote:
> > Fix the following Smatch complaint:
> 
> Thanks for the report and the patch!
> 
> >       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>
> > Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> > Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> A small detail (I think): the Signed-off-by of the sender (Geliang) should
> be the last one in the list if I am not mistaken.
> But I guess this is not blocking.

Generally, I like them to be in chronological order.  For other tags like
here it doesn't matter, but for signed-off-bys they only make sense in
chronological order.

regards,
dan carpenter


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

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09 13:59 [MPTCP][PATCH net 0/2] fix static checker warnings in Geliang Tang
2020-11-09 13:59 ` [MPTCP][PATCH net 1/2] mptcp: fix static checker warnings in mptcp_pm_add_timer Geliang Tang
2020-11-09 13:59   ` [MPTCP][PATCH net 2/2] mptcp: cleanup for mptcp_pm_alloc_anno_list Geliang Tang
2020-11-09 16:35     ` Matthieu Baerts
2020-11-09 16:28   ` [MPTCP][PATCH net 1/2] mptcp: fix static checker warnings in mptcp_pm_add_timer Matthieu Baerts
2020-11-09 18:34     ` Dan Carpenter [this message]
2020-11-09 20:56       ` Jakub Kicinski
2020-11-09 20:57     ` Jakub Kicinski
2020-11-09 21:23       ` Matthieu Baerts
2020-11-09 22:20         ` Jakub Kicinski
2020-11-12  2:36           ` Geliang Tang

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=20201109183419.GQ18329@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=geliangtang@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathew.j.martineau@linux.intel.com \
    --cc=matthieu.baerts@tessares.net \
    --cc=mptcp@lists.01.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).