diff options
Diffstat (limited to 'drivers/net/ethernet/broadcom/cnic.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/cnic.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c index 23f23c97c2ad..f05fab65d78a 100644 --- a/drivers/net/ethernet/broadcom/cnic.c +++ b/drivers/net/ethernet/broadcom/cnic.c | |||
@@ -382,10 +382,8 @@ static int cnic_iscsi_nl_msg_recv(struct cnic_dev *dev, u32 msg_type, | |||
382 | if (l5_cid >= MAX_CM_SK_TBL_SZ) | 382 | if (l5_cid >= MAX_CM_SK_TBL_SZ) |
383 | break; | 383 | break; |
384 | 384 | ||
385 | rcu_read_lock(); | ||
386 | if (!rcu_access_pointer(cp->ulp_ops[CNIC_ULP_L4])) { | 385 | if (!rcu_access_pointer(cp->ulp_ops[CNIC_ULP_L4])) { |
387 | rc = -ENODEV; | 386 | rc = -ENODEV; |
388 | rcu_read_unlock(); | ||
389 | break; | 387 | break; |
390 | } | 388 | } |
391 | csk = &cp->csk_tbl[l5_cid]; | 389 | csk = &cp->csk_tbl[l5_cid]; |
@@ -414,7 +412,6 @@ static int cnic_iscsi_nl_msg_recv(struct cnic_dev *dev, u32 msg_type, | |||
414 | } | 412 | } |
415 | } | 413 | } |
416 | csk_put(csk); | 414 | csk_put(csk); |
417 | rcu_read_unlock(); | ||
418 | rc = 0; | 415 | rc = 0; |
419 | } | 416 | } |
420 | } | 417 | } |
@@ -615,7 +612,7 @@ static int cnic_unregister_device(struct cnic_dev *dev, int ulp_type) | |||
615 | cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL); | 612 | cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL); |
616 | 613 | ||
617 | mutex_lock(&cnic_lock); | 614 | mutex_lock(&cnic_lock); |
618 | if (rcu_dereference(cp->ulp_ops[ulp_type])) { | 615 | if (rcu_access_pointer(cp->ulp_ops[ulp_type])) { |
619 | RCU_INIT_POINTER(cp->ulp_ops[ulp_type], NULL); | 616 | RCU_INIT_POINTER(cp->ulp_ops[ulp_type], NULL); |
620 | cnic_put(dev); | 617 | cnic_put(dev); |
621 | } else { | 618 | } else { |