stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-rc 0/7] IB/hfi1: Fixes for RC
@ 2017-09-26 13:05 Dennis Dalessandro
  2017-09-26 13:06 ` [PATCH for-rc 5/7] Revert "IB/ipoib: Update broadcast object if PKey value was changed in index 0" Dennis Dalessandro
  2017-09-27 15:15 ` [PATCH for-rc 0/7] IB/hfi1: Fixes for RC Doug Ledford
  0 siblings, 2 replies; 3+ messages in thread
From: Dennis Dalessandro @ 2017-09-26 13:05 UTC (permalink / raw)
  To: dledford
  Cc: Mike Marciniszyn, Jan Sokolowski, Jakub Byczkowski, linux-rdma,
	Ira Weiny, Alex Estrin, stable, Michael J. Ruhl, Harish Chegondi,
	Sebastian Sanchez, Kamenee Arumugam

Here are our first batch of patches for 4.14 RC cycle. These all fix bugs and
most are pretty straight forward.

However, of note is a revert by Alex for an IPoIB patch. This has been marked
stable as well. 

Patches can can also be found in my GitHub repo at:
https://github.com/ddalessa/kernel/tree/for-4.14

---

Alex Estrin (1):
      Revert "IB/ipoib: Update broadcast object if PKey value was changed in index 0"

Harish Chegondi (1):
      IB/hfi1: Unsuccessful PCIe caps tuning should not fail driver load

Jan Sokolowski (1):
      IB/hfi1: Check eeprom config partition validity

Kamenee Arumugam (1):
      IB/hfi1: Return correct value in general interrupt handler

Michael J. Ruhl (1):
      IB/hfi1: On error, fix use after free during user context setup

Sebastian Sanchez (2):
      IB/hfi1: Turn off AOC TX after offline substates
      IB/hfi1: Only reset QSFP after link up and turn off AOC TX


 drivers/infiniband/hw/hfi1/chip.c       |  101 ++++++++++++++++++++++++-------
 drivers/infiniband/hw/hfi1/chip.h       |    3 +
 drivers/infiniband/hw/hfi1/eprom.c      |   20 +++++-
 drivers/infiniband/hw/hfi1/file_ops.c   |   41 +++++++------
 drivers/infiniband/hw/hfi1/pcie.c       |   50 ++++++---------
 drivers/infiniband/hw/hfi1/platform.c   |    4 +
 drivers/infiniband/ulp/ipoib/ipoib_ib.c |   13 ----
 7 files changed, 141 insertions(+), 91 deletions(-)

--
-Denny

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH for-rc 5/7] Revert "IB/ipoib: Update broadcast object if PKey value was changed in index 0"
  2017-09-26 13:05 [PATCH for-rc 0/7] IB/hfi1: Fixes for RC Dennis Dalessandro
@ 2017-09-26 13:06 ` Dennis Dalessandro
  2017-09-27 15:15 ` [PATCH for-rc 0/7] IB/hfi1: Fixes for RC Doug Ledford
  1 sibling, 0 replies; 3+ messages in thread
From: Dennis Dalessandro @ 2017-09-26 13:06 UTC (permalink / raw)
  To: dledford; +Cc: linux-rdma, Mike Marciniszyn, Alex Estrin, stable

From: Alex Estrin <alex.estrin@intel.com>

commit 9a9b8112699d will cause core to fail UD QP from being destroyed
on ipoib unload, therefore cause resources leakage.
On pkey change event above patch modifies mgid before calling underlying
driver to detach it from QP. Drivers' detach_mcast() will fail to find
modified mgid it was never given to attach in a first place.
Core qp->usecnt will never go down, so ib_destroy_qp() will fail.

IPoIB driver actually does take care of new broadcast mgid based on new
pkey by destroying an old mcast object in ipoib_mcast_dev_flush())
....
	if (priv->broadcast) {
		rb_erase(&priv->broadcast->rb_node, &priv->multicast_tree);
		list_add_tail(&priv->broadcast->list, &remove_list);
		priv->broadcast = NULL;
	}
...

then in restarted ipoib_macst_join_task() creating a new broadcast mcast
object, sending join request and on completion tells the driver to attach
to reinitialized QP:
...
if (!priv->broadcast) {
...
	broadcast = ipoib_mcast_alloc(dev, 0);
...
	memcpy(broadcast->mcmember.mgid.raw, priv->dev->broadcast + 4,
	       sizeof (union ib_gid));
	priv->broadcast = broadcast;
...

Fixes: 9a9b8112699d ("IB/ipoib: Update broadcast object if PKey value was changed in index 0")
Cc: stable@vger.kernel.org
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Alex Estrin <alex.estrin@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
---
 drivers/infiniband/ulp/ipoib/ipoib_ib.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 2e07537..6cd6163 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -1000,19 +1000,6 @@ static inline int update_parent_pkey(struct ipoib_dev_priv *priv)
 		 */
 		priv->dev->broadcast[8] = priv->pkey >> 8;
 		priv->dev->broadcast[9] = priv->pkey & 0xff;
-
-		/*
-		 * Update the broadcast address in the priv->broadcast object,
-		 * in case it already exists, otherwise no one will do that.
-		 */
-		if (priv->broadcast) {
-			spin_lock_irq(&priv->lock);
-			memcpy(priv->broadcast->mcmember.mgid.raw,
-			       priv->dev->broadcast + 4,
-			sizeof(union ib_gid));
-			spin_unlock_irq(&priv->lock);
-		}
-
 		return 0;
 	}
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH for-rc 0/7] IB/hfi1: Fixes for RC
  2017-09-26 13:05 [PATCH for-rc 0/7] IB/hfi1: Fixes for RC Dennis Dalessandro
  2017-09-26 13:06 ` [PATCH for-rc 5/7] Revert "IB/ipoib: Update broadcast object if PKey value was changed in index 0" Dennis Dalessandro
@ 2017-09-27 15:15 ` Doug Ledford
  1 sibling, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2017-09-27 15:15 UTC (permalink / raw)
  To: Dennis Dalessandro
  Cc: Mike Marciniszyn, Jan Sokolowski, Jakub Byczkowski, linux-rdma,
	Ira Weiny, Alex Estrin, stable, Michael J. Ruhl, Harish Chegondi,
	Sebastian Sanchez, Kamenee Arumugam

On Tue, 2017-09-26 at 06:05 -0700, Dennis Dalessandro wrote:
> Here are our first batch of patches for 4.14 RC cycle. These all fix
> bugs and
> most are pretty straight forward.
> 
> However, of note is a revert by Alex for an IPoIB patch. This has
> been marked
> stable as well. 
> 
> Patches can can also be found in my GitHub repo at:
> https://github.com/ddalessa/kernel/tree/for-4.14
> 
> ---
> 
> Alex Estrin (1):
>       Revert "IB/ipoib: Update broadcast object if PKey value was
> changed in index 0"
> 
> Harish Chegondi (1):
>       IB/hfi1: Unsuccessful PCIe caps tuning should not fail driver
> load
> 
> Jan Sokolowski (1):
>       IB/hfi1: Check eeprom config partition validity
> 
> Kamenee Arumugam (1):
>       IB/hfi1: Return correct value in general interrupt handler
> 
> Michael J. Ruhl (1):
>       IB/hfi1: On error, fix use after free during user context setup
> 
> Sebastian Sanchez (2):
>       IB/hfi1: Turn off AOC TX after offline substates
>       IB/hfi1: Only reset QSFP after link up and turn off AOC TX
> 
> 
>  drivers/infiniband/hw/hfi1/chip.c       |  101
> ++++++++++++++++++++++++-------
>  drivers/infiniband/hw/hfi1/chip.h       |    3 +
>  drivers/infiniband/hw/hfi1/eprom.c      |   20 +++++-
>  drivers/infiniband/hw/hfi1/file_ops.c   |   41 +++++++------
>  drivers/infiniband/hw/hfi1/pcie.c       |   50 ++++++---------
>  drivers/infiniband/hw/hfi1/platform.c   |    4 +
>  drivers/infiniband/ulp/ipoib/ipoib_ib.c |   13 ----
>  7 files changed, 141 insertions(+), 91 deletions(-)

Series applied to -rc, thanks.

-- 
Doug Ledford <dledford@redhat.com>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-27 15:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-26 13:05 [PATCH for-rc 0/7] IB/hfi1: Fixes for RC Dennis Dalessandro
2017-09-26 13:06 ` [PATCH for-rc 5/7] Revert "IB/ipoib: Update broadcast object if PKey value was changed in index 0" Dennis Dalessandro
2017-09-27 15:15 ` [PATCH for-rc 0/7] IB/hfi1: Fixes for RC Doug Ledford

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).