[PATCH] rds_rdma: don't assume infiniband device is PCI

Subsystems: networking [general], rds - reliable datagram sockets, the rest

STALE5325d

9 messages, 3 authors, 2012-01-13 · open the first message on its own page

[PATCH] rds_rdma: don't assume infiniband device is PCI

From: Thadeu Lima de Souza Cascardo <hidden>
Date: 2012-01-04 22:03:42

RDS code assumes that the struct ib_device dma_device member, which is a
pointer, points to a struct device embedded in a struct pci_dev.

This is not the case for ehca, for example, which is a OF driver, and
makes dma_device point to a struct device embedded in a struct
platform_device.

This will make the system crash when rds_rdma is loaded in a system
with ehca, since it will try to access the bus member of a non-existent
struct pci_dev.

The only reason rds_rdma uses the struct pci_dev is to get the NUMA node
the device is attached to. Using dev_to_node for that is much better,
since it won't assume which bus the infiniband is attached to.

Signed-off-by: Thadeu Lima de Souza Cascardo <redacted>
Cc: dledford@redhat.com
Cc: Jes.Sorensen@redhat.com
Cc: Venkat Venkatsubra <redacted>
Cc: rds-devel@oss.oracle.com
---
 net/rds/ib.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/net/rds/ib.h b/net/rds/ib.h
index edfaaaf..8d2b3d5 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
@@ -186,8 +186,7 @@ struct rds_ib_device {
 	struct work_struct	free_work;
 };
 
-#define pcidev_to_node(pcidev) pcibus_to_node(pcidev->bus)
-#define ibdev_to_node(ibdev) pcidev_to_node(to_pci_dev(ibdev->dma_device))
+#define ibdev_to_node(ibdev) dev_to_node(ibdev->dma_device)
 #define rdsibdev_to_node(rdsibdev) ibdev_to_node(rdsibdev->dev)
 
 /* bits for i_ack_flags */
-- 
1.7.4.4

Re: [PATCH] rds_rdma: don't assume infiniband device is PCI

From: Roland Dreier <hidden>
Date: 2012-01-06 17:47:33

Looks great to me:

Reviewed-by: Roland Dreier <redacted>

Re: [PATCH] rds_rdma: don't assume infiniband device is PCI

From: Roland Dreier <hidden>
Date: 2012-01-06 17:50:01

On Fri, Jan 6, 2012 at 9:47 AM, Roland Dreier [off-list ref] wrote:
Looks great to me:
And BTW if Oracle has some non-published work they should probably just
rebase it on top of this fix.  We should merge this rather than shipping a
kernel with an obvious know crash like this.

 - R.

Re: [PATCH] rds_rdma: don't assume infiniband device is PCI

From: Thadeu Lima de Souza Cascardo <hidden>
Date: 2012-01-13 18:19:54

On Fri, Jan 06, 2012 at 09:49:36AM -0800, Roland Dreier wrote:
On Fri, Jan 6, 2012 at 9:47 AM, Roland Dreier [off-list ref] wrote:
quoted
Looks great to me:
And BTW if Oracle has some non-published work they should probably just
rebase it on top of this fix.  We should merge this rather than shipping a
kernel with an obvious know crash like this.

 - R.
Hi, Roland.

Sorry that I didn't include you. Should I include the infiniband users
under net/ in the files that Infiniband maintainers take care of?

David,

Is this going through your tree? In patchwork, its state is "Not
Applicable".

Thanks.
Cascardo.

Re: [PATCH] rds_rdma: don't assume infiniband device is PCI

From: David Miller <davem@davemloft.net>
Date: 2012-01-13 18:25:31

From: Thadeu Lima de Souza Cascardo <redacted>
Date: Fri, 13 Jan 2012 16:17:06 -0200
Is this going through your tree? In patchwork, its state is "Not
Applicable".
There was an active RDS maintainer, though I haven't seen patches
from that person in a while.

Re: [PATCH] rds_rdma: don't assume infiniband device is PCI

From: Roland Dreier <hidden>
Date: 2012-01-13 18:35:35

On Fri, Jan 13, 2012 at 10:17 AM, Thadeu Lima de Souza Cascardo
[off-list ref] wrote:
Hi, Roland.

Sorry that I didn't include you. Should I include the infiniband users
under net/ in the files that Infiniband maintainers take care of?
I don't maintain those things but I may have an opinion about them :)

 - R.

Re: [PATCH] rds_rdma: don't assume infiniband device is PCI

From: Thadeu Lima de Souza Cascardo <hidden>
Date: 2012-01-13 18:53:55

On Fri, Jan 13, 2012 at 10:25:18AM -0800, David Miller wrote:
From: Thadeu Lima de Souza Cascardo <redacted>
Date: Fri, 13 Jan 2012 16:17:06 -0200
quoted
Is this going through your tree? In patchwork, its state is "Not
Applicable".
There was an active RDS maintainer, though I haven't seen patches
from that person in a while.
Hi, David.

Venkat is the current RDS maintainer and he has Acked the patch.

Thanks.
Cascardo.

Re: [PATCH] rds_rdma: don't assume infiniband device is PCI

From: David Miller <davem@davemloft.net>
Date: 2012-01-13 21:13:13

From: Thadeu Lima de Souza Cascardo <redacted>
Date: Fri, 13 Jan 2012 16:52:58 -0200
On Fri, Jan 13, 2012 at 10:25:18AM -0800, David Miller wrote:
quoted
From: Thadeu Lima de Souza Cascardo <redacted>
Date: Fri, 13 Jan 2012 16:17:06 -0200
quoted
Is this going through your tree? In patchwork, its state is "Not
Applicable".
There was an active RDS maintainer, though I haven't seen patches
from that person in a while.
Hi, David.

Venkat is the current RDS maintainer and he has Acked the patch.
Not according to patchwork.  I don't see him reply at all to the
patch posting and give his explicit "Acked-by: "

Re: [PATCH] rds_rdma: don't assume infiniband device is PCI

From: Thadeu Lima de Souza Cascardo <hidden>
Date: 2012-01-13 21:22:02

On Fri, Jan 13, 2012 at 01:12:48PM -0800, David Miller wrote:
From: Thadeu Lima de Souza Cascardo <redacted>
Date: Fri, 13 Jan 2012 16:52:58 -0200
quoted
On Fri, Jan 13, 2012 at 10:25:18AM -0800, David Miller wrote:
quoted
From: Thadeu Lima de Souza Cascardo <redacted>
Date: Fri, 13 Jan 2012 16:17:06 -0200
quoted
Is this going through your tree? In patchwork, its state is "Not
Applicable".
There was an active RDS maintainer, though I haven't seen patches
from that person in a while.
Hi, David.

Venkat is the current RDS maintainer and he has Acked the patch.
Not according to patchwork.  I don't see him reply at all to the
patch posting and give his explicit "Acked-by: "
Venkat,

Care to send an Acked-by using a different MUA? Yours sends no
In-Reply-To or References header field.

David,

This is the message Venkat has sent.

http://marc.info/?l=linux-netdev&m=132587819932339&w=2

Thanks.
Cascardo.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help