netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>
To: Denis Drozdov <denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH net 2/2] IB/ipoib: Fix netlink support in IPoIB
Date: Sun, 31 Dec 2017 13:23:08 -0700	[thread overview]
Message-ID: <20171231202308.GA10145@ziepe.ca> (raw)
In-Reply-To: <1514718983-466-3-git-send-email-denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

On Sun, Dec 31, 2017 at 01:16:23PM +0200, Denis Drozdov wrote:
> IPoIB netlink support was broken by commit cd565b4b51e5
> ("IB/IPoIB: Support acceleration options callbacks"),
> that added flow which allocates netdev rdma structures
> after netlink object is already created. Such situation leads
> to crash in __ipoib_device_add, once trying to reuse netlink
> device.
> This commit restores the netlink support.
> 
> Fixes: cd565b4b51e5 ("IB/IPoIB: Support acceleration options callbacks")
> Reviewed-by: Erez Shitrit <erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Reviewed-by: Saeed Mahameed <saeedm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Denis Drozdov <denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>  drivers/infiniband/ulp/ipoib/ipoib.h         |  2 ++
>  drivers/infiniband/ulp/ipoib/ipoib_main.c    | 23 +++++++++--------
>  drivers/infiniband/ulp/ipoib/ipoib_netlink.c | 38 +++++++++++++++++++++++++---
>  drivers/infiniband/ulp/ipoib/ipoib_vlan.c    | 20 ++++-----------
>  4 files changed, 54 insertions(+), 29 deletions(-)

I assume this is going through DaveM's tree? In which case for the
drivers/infiniband part:

Acked-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

> @@ -131,11 +157,15 @@ static int ipoib_new_child_link(struct net *src_net, struct net_device *dev,
>  	 */
>  	child_pkey |= 0x8000;
>  
> -	err = __ipoib_vlan_add(ppriv, ipoib_priv(dev),
> -			       child_pkey, IPOIB_RTNL_CHILD);
> +	down_write(&ppriv->vlan_rwsem);
> +
> +	priv = ipoib_priv(dev);
> +	err = __ipoib_vlan_add(ppriv, priv, child_pkey, IPOIB_RTNL_CHILD);
> +	up_write(&ppriv->vlan_rwsem);

This looks like a necessary and correct change, but does it need to be
a seperate bug fix commit?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-12-31 20:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-31 11:16 [PATCH net 0/2] IB/ipoib: ip link support Denis Drozdov
2017-12-31 11:16 ` [PATCH net 2/2] IB/ipoib: Fix netlink support in IPoIB Denis Drozdov
     [not found]   ` <1514718983-466-3-git-send-email-denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-12-31 20:23     ` Jason Gunthorpe [this message]
     [not found]       ` <20171231202308.GA10145-uk2M96/98Pc@public.gmane.org>
2018-01-01  6:38         ` Leon Romanovsky
     [not found] ` <1514718983-466-1-git-send-email-denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-12-31 11:16   ` [PATCH net 1/2] rtnl: device allocation/free via rtnl_link_ops Denis Drozdov
     [not found]     ` <1514718983-466-2-git-send-email-denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2018-01-01 22:43       ` [rtnl] b1585bdfb2: kernel_BUG_at_net/core/dev.c kernel test robot
2018-01-09 21:42         ` [PATCH v2 net 0/2] IB/ipoib: ip link support Denis Drozdov
     [not found]           ` <1515534167-13062-1-git-send-email-denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2018-01-09 21:42             ` [PATCH v2 net 1/2] rtnl: device allocation/free via rtnl_link_ops Denis Drozdov
2018-01-09 21:42           ` [PATCH v2 net 2/2] IB/ipoib: Fix netlink support in IPoIB Denis Drozdov
2018-01-15 18:13           ` [PATCH v2 net 0/2] IB/ipoib: ip link support David Miller
     [not found]             ` <20180115.131309.1163036253579166139.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2018-01-18  4:25               ` Jason Gunthorpe
2018-05-07 17:29                 ` Or Gerlitz
2017-12-31 12:28   ` [PATCH " Or Gerlitz
     [not found]     ` <CAJ3xEMiVHc=E7=uKJ4cRRRDxjNDRKQ17=NxnYsEeXNe6-RUvvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-02  7:29       ` Or Gerlitz
2018-01-02  8:44         ` Erez Shitrit
2018-01-02  9:15           ` Or Gerlitz

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=20171231202308.GA10145@ziepe.ca \
    --to=jgg-uk2m96/98pc@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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).