netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Roopa Prabhu <roopa@cumulusnetworks.com>
Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
	dsahern@gmail.com, nikolay@cumulusnetworks.com,
	jiri@mellanox.com, idosch@mellanox.com, petrm@mellanox.com
Subject: Re: [PATCH net-next 0/2] vxlan fdb nexthop misc fixes
Date: Sat, 30 May 2020 16:34:30 +0300	[thread overview]
Message-ID: <20200530133430.GA1623322@splinter> (raw)
In-Reply-To: <1590729156-35543-1-git-send-email-roopa@cumulusnetworks.com>

On Thu, May 28, 2020 at 10:12:34PM -0700, Roopa Prabhu wrote:
> From: Roopa Prabhu <roopa@cumulusnetworks.com>

Hi Roopa,

I noticed that sparse complains about the following problem in
the original submission (not handled by current set):

drivers/net/vxlan.c:884:41: warning: dereference of noderef expression

Seems to be fixed by:

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 39bc10a7fd2e..ea7af03e0957 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -881,13 +881,13 @@ static int vxlan_fdb_nh_update(struct vxlan_dev *vxlan, struct vxlan_fdb *fdb,
                        goto err_inval;
                }
 
-               if (!nh->is_group || !nh->nh_grp->mpath) {
+               nhg = rtnl_dereference(nh->nh_grp);
+               if (!nh->is_group || !nhg->mpath) {
                        NL_SET_ERR_MSG(extack, "Nexthop is not a multipath group");
                        goto err_inval;
                }
 
                /* check nexthop group family */
-               nhg = rtnl_dereference(nh->nh_grp);
                switch (vxlan->default_dst.remote_ip.sa.sa_family) {
                case AF_INET:
                        if (!nhg->has_v4) {

Assuming it's correct, can you please fold it into v2?

> 
> Roopa Prabhu (2):
>   vxlan: add check to prevent use of remote ip attributes with NDA_NH_ID
>   vxlan: few locking fixes in nexthop event handler
> 
>  drivers/net/vxlan.c | 36 +++++++++++++++++++++++++++++-------
>  1 file changed, 29 insertions(+), 7 deletions(-)
> 
> -- 
> 2.1.4
> 

  parent reply	other threads:[~2020-05-30 13:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29  5:12 [PATCH net-next 0/2] vxlan fdb nexthop misc fixes Roopa Prabhu
2020-05-29  5:12 ` [PATCH net-next 1/2] vxlan: add check to prevent use of remote ip attributes with NDA_NH_ID Roopa Prabhu
2020-05-29  5:12 ` [PATCH net-next 2/2] vxlan: few locking fixes in nexthop event handler Roopa Prabhu
2020-05-30 13:34 ` Ido Schimmel [this message]
2020-05-30 19:07   ` [PATCH net-next 0/2] vxlan fdb nexthop misc fixes Roopa Prabhu
2020-05-31  4:47 ` David Miller

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=20200530133430.GA1623322@splinter \
    --to=idosch@idosch.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=idosch@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=petrm@mellanox.com \
    --cc=roopa@cumulusnetworks.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).