netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/1] cnic: Update the rcu_access_pointer() usages
@ 2014-10-28  5:18 Nilesh Javali
  2014-10-28  5:18 ` [PATCH net 1/1] " Nilesh Javali
  0 siblings, 1 reply; 3+ messages in thread
From: Nilesh Javali @ 2014-10-28  5:18 UTC (permalink / raw)
  To: davem
  Cc: netdev, Dept-GELinuxNICDev, sudarsana.kalluru, vikas.chaudhary,
	giridhar.malavali, tej.parkash

This patch updates the rcu_access_pointer usages:

Tej Parkash (1):
      cnic: Update the rcu_access_pointer() usages

 drivers/net/ethernet/broadcom/cnic.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

Please apply this patch to net.

Thanks,
Nilesh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH net 1/1] cnic: Update the rcu_access_pointer() usages
  2014-10-28  5:18 [PATCH net 0/1] cnic: Update the rcu_access_pointer() usages Nilesh Javali
@ 2014-10-28  5:18 ` Nilesh Javali
  2014-10-29 19:07   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Nilesh Javali @ 2014-10-28  5:18 UTC (permalink / raw)
  To: davem
  Cc: netdev, Dept-GELinuxNICDev, sudarsana.kalluru, vikas.chaudhary,
	giridhar.malavali, tej.parkash

From: Tej Parkash <tej.parkash@qlogic.com>

1. Remove the rcu_read_lock/unlock around rcu_access_pointer
2. Replace the rcu_dereference with rcu_access_pointer

Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
---
 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 23f23c9..f05fab6 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,
 		if (l5_cid >= MAX_CM_SK_TBL_SZ)
 			break;
 
-		rcu_read_lock();
 		if (!rcu_access_pointer(cp->ulp_ops[CNIC_ULP_L4])) {
 			rc = -ENODEV;
-			rcu_read_unlock();
 			break;
 		}
 		csk = &cp->csk_tbl[l5_cid];
@@ -414,7 +412,6 @@ static int cnic_iscsi_nl_msg_recv(struct cnic_dev *dev, u32 msg_type,
 			}
 		}
 		csk_put(csk);
-		rcu_read_unlock();
 		rc = 0;
 	}
 	}
@@ -615,7 +612,7 @@ static int cnic_unregister_device(struct cnic_dev *dev, int ulp_type)
 		cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL);
 
 	mutex_lock(&cnic_lock);
-	if (rcu_dereference(cp->ulp_ops[ulp_type])) {
+	if (rcu_access_pointer(cp->ulp_ops[ulp_type])) {
 		RCU_INIT_POINTER(cp->ulp_ops[ulp_type], NULL);
 		cnic_put(dev);
 	} else {
-- 
1.5.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net 1/1] cnic: Update the rcu_access_pointer() usages
  2014-10-28  5:18 ` [PATCH net 1/1] " Nilesh Javali
@ 2014-10-29 19:07   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2014-10-29 19:07 UTC (permalink / raw)
  To: nilesh.javali
  Cc: netdev, Dept-GELinuxNICDev, sudarsana.kalluru, vikas.chaudhary,
	giridhar.malavali, tej.parkash

From: Nilesh Javali <nilesh.javali@qlogic.com>
Date: Tue, 28 Oct 2014 01:18:15 -0400

> From: Tej Parkash <tej.parkash@qlogic.com>
> 
> 1. Remove the rcu_read_lock/unlock around rcu_access_pointer
> 2. Replace the rcu_dereference with rcu_access_pointer
> 
> Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-29 19:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-28  5:18 [PATCH net 0/1] cnic: Update the rcu_access_pointer() usages Nilesh Javali
2014-10-28  5:18 ` [PATCH net 1/1] " Nilesh Javali
2014-10-29 19:07   ` David Miller

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).