lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20180409001637.162453-133-alexander.levin@microsoft.com> Date: Mon, 9 Apr 2018 00:18:33 +0000 From: Sasha Levin <Alexander.Levin@...rosoft.com> To: "stable@...r.kernel.org" <stable@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> CC: Alex Estrin <alex.estrin@...el.com>, Dennis Dalessandro <dennis.dalessandro@...el.com>, Jason Gunthorpe <jgg@...lanox.com>, Sasha Levin <Alexander.Levin@...rosoft.com> Subject: [PATCH AUTOSEL for 4.15 133/189] IB/ipoib: Fix for potential no-carrier state From: Alex Estrin <alex.estrin@...el.com> [ Upstream commit 1029361084d18cc270f64dfd39529fafa10cfe01 ] On reboot SM can program port pkey table before ipoib registered its event handler, which could result in missing pkey event and leave root interface with initial pkey value from index 0. Since OPA port starts with invalid pkey in index 0, root interface will fail to initialize and stay down with no-carrier flag. For IB ipoib interface may end up with pkey different from value opensm put in pkey table idx 0, resulting in connectivity issues (different mcast groups, for example). Close the window by calling event handler after registration to make sure ipoib pkey is in sync with port pkey table. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@...el.com> Reviewed-by: Ira Weiny <ira.weiny@...el.com> Signed-off-by: Alex Estrin <alex.estrin@...el.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@...el.com> Signed-off-by: Jason Gunthorpe <jgg@...lanox.com> Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com> --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 160c5d9bca4c..4e75848f7a35 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -2287,6 +2287,9 @@ static struct net_device *ipoib_add_port(const char *format, priv->ca, ipoib_event); ib_register_event_handler(&priv->event_handler); + /* call event handler to ensure pkey in sync */ + queue_work(ipoib_workqueue, &priv->flush_heavy); + result = register_netdev(priv->dev); if (result) { printk(KERN_WARNING "%s: couldn't register ipoib port %d; error %d\n", -- 2.15.1
Powered by blists - more mailing lists