Skip to contentSkip to conversation

Fixes for vmw_pvrdma

PATCH In review Adit Ranadive 3 participants 5 messages Jan 19, 2017 – Jan 24, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Fixes for vmw_pvrdma

Hi Doug,

Here are the fixes for vmw_pvrdma for this round of rc. These apply cleanly to your k.o/for-4.10-rc branch.

Thanks,
Adit

Adit Ranadive (2):
IB/vmw_pvrdma: Don't leak info from alloc_ucontext IB/vmw_pvrdma: Fix incorrect cleanup on pvrdma_pci_probe error path

 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c  | 4 +---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): cover.1484859556.git.aditr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org

#2 lore raw

PATCH 1/2 IB/vmw_pvrdma: Don't leak info from alloc_ucontext

Clear out the user response struct correctly.

Fixes 29c8d9eba550 ("IB: Add vmw_pvrdma driver")
---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c +1 -1
index 5489137..c2aa526 100644
@@ -306,7 +306,7 @@ struct ib_ucontext *pvrdma_alloc_ucontext(struct ib_device *ibdev,
 	union pvrdma_cmd_resp rsp;
 	struct pvrdma_cmd_create_uc *cmd = &req.create_uc;
 	struct pvrdma_cmd_create_uc_resp *resp = &rsp.create_uc_resp;
-	struct pvrdma_alloc_ucontext_resp uresp;
+	struct pvrdma_alloc_ucontext_resp uresp = {0};
 	int ret;
 	void *ptr;
 
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

PATCH 2/2 IB/vmw_pvrdma: Fix incorrect cleanup on pvrdma_pci_probe error path

In reply to a message not in the archive

If the interrupt allocation failed we should start freeing the CQ rings rather than unregistering the netdev notifier.

Fixes 29c8d9eba550 ("IB: Add vmw_pvrdma driver")
---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c +1 -3
index 231a1ce..bd8fbd3 100644
@@ -1029,7 +1029,7 @@ static int pvrdma_pci_probe(struct pci_dev *pdev,
 	if (ret) {
 		dev_err(&pdev->dev, "failed to allocate interrupts\n");
 		ret = -ENOMEM;
-		goto err_netdevice;
+		goto err_free_cq_ring;
 	}
 
 	/* Allocate UAR table. */
@@ -1092,8 +1092,6 @@ static int pvrdma_pci_probe(struct pci_dev *pdev,
 err_free_intrs:
 	pvrdma_free_irq(dev);
 	pvrdma_disable_msi_all(dev);
-err_netdevice:
-	unregister_netdevice_notifier(&dev->nb_netdev);
 err_free_cq_ring:
 	pvrdma_page_dir_cleanup(dev, &dev->cq_pdir);
 err_free_async_ring:
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): cd1027c125c3c098c59fa3c612e6bf617aa77dc9.1484859556.git.aditr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org

Reviewed-by
#5 lore raw

Re: [PATCH 2/2] IB/vmw_pvrdma: Fix incorrect cleanup on pvrdma_pci_probe error path

Quoted 23 lines · Adit Ranadive

If the interrupt allocation failed we should start freeing the CQ rings rather than unregistering the netdev notifier.

Fixes 29c8d9eba550 ("IB: Add vmw_pvrdma driver")
---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c +1 -1
index 231a1ce..bd8fbd3 100644
@@ -1029,7 +1029,7 @@ static int pvrdma_pci_probe(struct pci_dev *pdev,
 	if (ret) {
 		dev_err(&pdev->dev, "failed to allocate interrupts\n");
 		ret = -ENOMEM;
-		goto err_netdevice;
+		goto err_free_cq_ring;
 	}
 
 	/* Allocate UAR table. */

drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c static int pvrdma_pci_probe(struct pci_dev *pdev, · line 1097

Quoted 8 lines
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c +0 -2
@@ -1092,8 +1092,6 @@ static int pvrdma_pci_probe(struct pci_dev *pdev,
 err_free_intrs:
 	pvrdma_free_irq(dev);
 	pvrdma_disable_msi_all(dev);
-err_netdevice:
-	unregister_netdevice_notifier(&dev->nb_netdev);
 err_free_cq_ring:
 	pvrdma_page_dir_cleanup(dev, &dev->cq_pdir);
 err_free_async_ring:
Quoted 7 lines
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
In reply to a message not in the archive
Quoted 8 lines · Adit Ranadive

Hi Doug,

Here are the fixes for vmw_pvrdma for this round of rc. These apply cleanly to your k.o/for-4.10-rc branch.

Thanks,
Adit

Quoted 7 lines

Adit Ranadive (2):
  IB/vmw_pvrdma: Don't leak info from alloc_ucontext IB/vmw_pvrdma: Fix incorrect cleanup on pvrdma_pci_probe error path

 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c  | 4 +--- drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 2 +-

 2 files changed, 2 insertions(+), 4 deletions(-)

Thanks, series applied.

Signature · 4 lines
Doug Ledford <[email protected]>
    GPG KeyID: B826A3330E572FDD
   
Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD