diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 48c72fe35..76c29be1c 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -3416,7 +3416,9 @@ static int srpt_release_sdev(struct srpt_device *sdev) WARN_ON_ONCE(irqs_disabled()); BUG_ON(!sdev); + /* Disallow new logins and close all active sessions. */ spin_lock_irq(&sdev->spinlock); + sdev->enabled = false; list_for_each_entry_safe(ch, next_ch, &sdev->rch_list, list) __srpt_close_ch(ch); spin_unlock_irq(&sdev->spinlock);