[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200212072543.GI14453@workstation-portable>
Date: Wed, 12 Feb 2020 12:55:43 +0530
From: Amol Grover <frextrite@...il.com>
To: Hannes Reinecke <hare@...e.de>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kernel-mentees@...ts.linuxfoundation.org,
Joel Fernandes <joel@...lfernandes.org>,
Madhuparna Bhowmik <madhuparnabhowmik04@...il.com>,
"Paul E . McKenney" <paulmck@...nel.org>,
Amol Grover <frextrite@...il.com>
Subject: [PATCH 2/2 RESEND] scsi: qedf: qedf_main: Pass lockdep expression to
RCU lists
lport->disc.rports is traversed using list_for_each_entry_rcu
outside an RCU read-side critical section but under the protection
of lport->disc.disc_mutex.
Hence, add corresponding lockdep expression to silence false-positive
lockdep warnings, and harden RCU lists.
Signed-off-by: Amol Grover <frextrite@...il.com>
---
drivers/scsi/qedf/qedf_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 604856e72cfb..17eab7f8cf05 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -420,7 +420,8 @@ static void qedf_link_recovery(struct work_struct *work)
* ADISC since the rport is in state ready.
*/
mutex_lock(&lport->disc.disc_mutex);
- list_for_each_entry_rcu(rdata, &lport->disc.rports, peers) {
+ list_for_each_entry_rcu(rdata, &lport->disc.rports, peers,
+ lockdep_is_held(&lport->disc.disc_mutex)) {
if (kref_get_unless_zero(&rdata->kref)) {
fc_rport_login(rdata);
kref_put(&rdata->kref, fc_rport_destroy);
--
2.24.1
Powered by blists - more mailing lists