aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-06-19 19:49:39 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-19 19:49:39 -0400
commitd98cae64e4a733ff377184d78aa0b1f2b54faede (patch)
treee973e3c93fe7e17741567ac3947f5197bc9d582d /drivers/infiniband
parent646093a29f85630d8efe2aa38fa585d2c3ea2e46 (diff)
parent4067c666f2dccf56f5db5c182713e68c40d46013 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/wireless/ath/ath9k/Kconfig drivers/net/xen-netback/netback.c net/batman-adv/bat_iv_ogm.c net/wireless/nl80211.c The ath9k Kconfig conflict was a change of a Kconfig option name right next to the deletion of another option. The xen-netback conflict was overlapping changes involving the handling of the notify list in xen_netbk_rx_action(). Batman conflict resolution provided by Antonio Quartulli, basically keep everything in both conflict hunks. The nl80211 conflict is a little more involved. In 'net' we added a dynamic memory allocation to nl80211_dump_wiphy() to fix a race that Linus reported. Meanwhile in 'net-next' the handlers were converted to use pre and post doit handlers which use a flag to determine whether to hold the RTNL mutex around the operation. However, the dump handlers to not use this logic. Instead they have to explicitly do the locking. There were apparent bugs in the conversion of nl80211_dump_wiphy() in that we were not dropping the RTNL mutex in all the return paths, and it seems we very much should be doing so. So I fixed that whilst handling the overlapping changes. To simplify the initial returns, I take the RTNL mutex after we try to allocate 'tb'. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/qib/qib_keys.c2
-rw-r--r--drivers/infiniband/ulp/iser/iscsi_iser.c1
-rw-r--r--drivers/infiniband/ulp/iser/iscsi_iser.h1
-rw-r--r--drivers/infiniband/ulp/iser/iser_initiator.c1
-rw-r--r--drivers/infiniband/ulp/iser/iser_memory.c1
-rw-r--r--drivers/infiniband/ulp/iser/iser_verbs.c16
6 files changed, 14 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/qib/qib_keys.c b/drivers/infiniband/hw/qib/qib_keys.c
index 81c7b73695d2..3b9afccaaade 100644
--- a/drivers/infiniband/hw/qib/qib_keys.c
+++ b/drivers/infiniband/hw/qib/qib_keys.c
@@ -61,7 +61,7 @@ int qib_alloc_lkey(struct qib_mregion *mr, int dma_region)
61 if (dma_region) { 61 if (dma_region) {
62 struct qib_mregion *tmr; 62 struct qib_mregion *tmr;
63 63
64 tmr = rcu_dereference(dev->dma_mr); 64 tmr = rcu_access_pointer(dev->dma_mr);
65 if (!tmr) { 65 if (!tmr) {
66 qib_get_mr(mr); 66 qib_get_mr(mr);
67 rcu_assign_pointer(dev->dma_mr, mr); 67 rcu_assign_pointer(dev->dma_mr, mr);
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
index f19b0998a53c..2e84ef859c5b 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
@@ -5,6 +5,7 @@
5 * Copyright (C) 2004 Alex Aizman 5 * Copyright (C) 2004 Alex Aizman
6 * Copyright (C) 2005 Mike Christie 6 * Copyright (C) 2005 Mike Christie
7 * Copyright (c) 2005, 2006 Voltaire, Inc. All rights reserved. 7 * Copyright (c) 2005, 2006 Voltaire, Inc. All rights reserved.
8 * Copyright (c) 2013 Mellanox Technologies. All rights reserved.
8 * maintained by openib-general@openib.org 9 * maintained by openib-general@openib.org
9 * 10 *
10 * This software is available to you under a choice of one of two 11 * This software is available to you under a choice of one of two
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h
index 06f578cde75b..4f069c0d4c04 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.h
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.h
@@ -8,6 +8,7 @@
8 * 8 *
9 * Copyright (c) 2004, 2005, 2006 Voltaire, Inc. All rights reserved. 9 * Copyright (c) 2004, 2005, 2006 Voltaire, Inc. All rights reserved.
10 * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved. 10 * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.
11 * Copyright (c) 2013 Mellanox Technologies. All rights reserved.
11 * 12 *
12 * This software is available to you under a choice of one of two 13 * This software is available to you under a choice of one of two
13 * licenses. You may choose to be licensed under the terms of the GNU 14 * licenses. You may choose to be licensed under the terms of the GNU
diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c
index a00ccd1ca333..b6d81a86c976 100644
--- a/drivers/infiniband/ulp/iser/iser_initiator.c
+++ b/drivers/infiniband/ulp/iser/iser_initiator.c
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright (c) 2004, 2005, 2006 Voltaire, Inc. All rights reserved. 2 * Copyright (c) 2004, 2005, 2006 Voltaire, Inc. All rights reserved.
3 * Copyright (c) 2013 Mellanox Technologies. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU 6 * licenses. You may choose to be licensed under the terms of the GNU
diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c
index 68ebb7fe072a..7827baf455a1 100644
--- a/drivers/infiniband/ulp/iser/iser_memory.c
+++ b/drivers/infiniband/ulp/iser/iser_memory.c
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright (c) 2004, 2005, 2006 Voltaire, Inc. All rights reserved. 2 * Copyright (c) 2004, 2005, 2006 Voltaire, Inc. All rights reserved.
3 * Copyright (c) 2013 Mellanox Technologies. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU 6 * licenses. You may choose to be licensed under the terms of the GNU
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
index 5278916c3103..2c4941d0656b 100644
--- a/drivers/infiniband/ulp/iser/iser_verbs.c
+++ b/drivers/infiniband/ulp/iser/iser_verbs.c
@@ -1,6 +1,7 @@
1/* 1/*
2 * Copyright (c) 2004, 2005, 2006 Voltaire, Inc. All rights reserved. 2 * Copyright (c) 2004, 2005, 2006 Voltaire, Inc. All rights reserved.
3 * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved. 3 * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.
4 * Copyright (c) 2013 Mellanox Technologies. All rights reserved.
4 * 5 *
5 * This software is available to you under a choice of one of two 6 * This software is available to you under a choice of one of two
6 * licenses. You may choose to be licensed under the terms of the GNU 7 * licenses. You may choose to be licensed under the terms of the GNU
@@ -292,10 +293,10 @@ out_err:
292} 293}
293 294
294/** 295/**
295 * releases the FMR pool, QP and CMA ID objects, returns 0 on success, 296 * releases the FMR pool and QP objects, returns 0 on success,
296 * -1 on failure 297 * -1 on failure
297 */ 298 */
298static int iser_free_ib_conn_res(struct iser_conn *ib_conn, int can_destroy_id) 299static int iser_free_ib_conn_res(struct iser_conn *ib_conn)
299{ 300{
300 int cq_index; 301 int cq_index;
301 BUG_ON(ib_conn == NULL); 302 BUG_ON(ib_conn == NULL);
@@ -314,13 +315,9 @@ static int iser_free_ib_conn_res(struct iser_conn *ib_conn, int can_destroy_id)
314 315
315 rdma_destroy_qp(ib_conn->cma_id); 316 rdma_destroy_qp(ib_conn->cma_id);
316 } 317 }
317 /* if cma handler context, the caller acts s.t the cma destroy the id */
318 if (ib_conn->cma_id != NULL && can_destroy_id)
319 rdma_destroy_id(ib_conn->cma_id);
320 318
321 ib_conn->fmr_pool = NULL; 319 ib_conn->fmr_pool = NULL;
322 ib_conn->qp = NULL; 320 ib_conn->qp = NULL;
323 ib_conn->cma_id = NULL;
324 kfree(ib_conn->page_vec); 321 kfree(ib_conn->page_vec);
325 322
326 if (ib_conn->login_buf) { 323 if (ib_conn->login_buf) {
@@ -415,11 +412,16 @@ static void iser_conn_release(struct iser_conn *ib_conn, int can_destroy_id)
415 list_del(&ib_conn->conn_list); 412 list_del(&ib_conn->conn_list);
416 mutex_unlock(&ig.connlist_mutex); 413 mutex_unlock(&ig.connlist_mutex);
417 iser_free_rx_descriptors(ib_conn); 414 iser_free_rx_descriptors(ib_conn);
418 iser_free_ib_conn_res(ib_conn, can_destroy_id); 415 iser_free_ib_conn_res(ib_conn);
419 ib_conn->device = NULL; 416 ib_conn->device = NULL;
420 /* on EVENT_ADDR_ERROR there's no device yet for this conn */ 417 /* on EVENT_ADDR_ERROR there's no device yet for this conn */
421 if (device != NULL) 418 if (device != NULL)
422 iser_device_try_release(device); 419 iser_device_try_release(device);
420 /* if cma handler context, the caller actually destroy the id */
421 if (ib_conn->cma_id != NULL && can_destroy_id) {
422 rdma_destroy_id(ib_conn->cma_id);
423 ib_conn->cma_id = NULL;
424 }
423 iscsi_destroy_endpoint(ib_conn->ep); 425 iscsi_destroy_endpoint(ib_conn->ep);
424} 426}
425 427