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@xxxxxxxxx> --- 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