* [PATCH] RDMA/i40iw: Fix incorrect iterator type
@ 2018-09-17 14:07 Håkon Bugge
2018-09-19 16:13 ` Jason Gunthorpe
2018-09-23 14:24 ` Saleem, Shiraz
0 siblings, 2 replies; 3+ messages in thread
From: Håkon Bugge @ 2018-09-17 14:07 UTC (permalink / raw)
To: Doug Ledford, faisal.latif, shiraz.saleem, jgg; +Cc: linux-rdma, linux-kernel
Commit f27b4746f378 ("i40iw: add connection management code") uses an
incorrect rcu iterator, whilst holding the rtnl_lock. Since the
critical region invokes i40iw_manage_qhash(), which is a sleeping
function, the rcu locking and traversal cannot be used.
Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
---
drivers/infiniband/hw/i40iw/i40iw_cm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c
index 423818a7d333..771eb6bd0785 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_cm.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c
@@ -1689,7 +1689,7 @@ static enum i40iw_status_code i40iw_add_mqh_6(struct i40iw_device *iwdev,
unsigned long flags;
rtnl_lock();
- for_each_netdev_rcu(&init_net, ip_dev) {
+ for_each_netdev(&init_net, ip_dev) {
if ((((rdma_vlan_dev_vlan_id(ip_dev) < I40IW_NO_VLAN) &&
(rdma_vlan_dev_real_dev(ip_dev) == iwdev->netdev)) ||
(ip_dev == iwdev->netdev)) && (ip_dev->flags & IFF_UP)) {
--
2.14.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] RDMA/i40iw: Fix incorrect iterator type
2018-09-17 14:07 [PATCH] RDMA/i40iw: Fix incorrect iterator type Håkon Bugge
@ 2018-09-19 16:13 ` Jason Gunthorpe
2018-09-23 14:24 ` Saleem, Shiraz
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2018-09-19 16:13 UTC (permalink / raw)
To: Håkon Bugge
Cc: Doug Ledford, faisal.latif, shiraz.saleem, linux-rdma, linux-kernel
On Mon, Sep 17, 2018 at 04:07:07PM +0200, Håkon Bugge wrote:
> Commit f27b4746f378 ("i40iw: add connection management code") uses an
> incorrect rcu iterator, whilst holding the rtnl_lock. Since the
> critical region invokes i40iw_manage_qhash(), which is a sleeping
> function, the rcu locking and traversal cannot be used.
>
> Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
> ---
> drivers/infiniband/hw/i40iw/i40iw_cm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] RDMA/i40iw: Fix incorrect iterator type
2018-09-17 14:07 [PATCH] RDMA/i40iw: Fix incorrect iterator type Håkon Bugge
2018-09-19 16:13 ` Jason Gunthorpe
@ 2018-09-23 14:24 ` Saleem, Shiraz
1 sibling, 0 replies; 3+ messages in thread
From: Saleem, Shiraz @ 2018-09-23 14:24 UTC (permalink / raw)
To: Håkon Bugge, Doug Ledford, Latif, Faisal, jgg
Cc: linux-rdma, linux-kernel
>Subject: [PATCH] RDMA/i40iw: Fix incorrect iterator type
>
>Commit f27b4746f378 ("i40iw: add connection management code") uses an
>incorrect rcu iterator, whilst holding the rtnl_lock. Since the critical region invokes
>i40iw_manage_qhash(), which is a sleeping function, the rcu locking and
>traversal cannot be used.
>
>Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
>---
> drivers/infiniband/hw/i40iw/i40iw_cm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks doing this Hakon!
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-23 14:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-17 14:07 [PATCH] RDMA/i40iw: Fix incorrect iterator type Håkon Bugge
2018-09-19 16:13 ` Jason Gunthorpe
2018-09-23 14:24 ` Saleem, Shiraz
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).