From 35547df5c78653b2da030f920323c0357056099f Mon Sep 17 00:00:00 2001 From: Scott Long Date: Tue, 10 Aug 2021 22:36:38 +0000 Subject: [PATCH] Call wakeup() with the lock held to avoid missed wakeup races. Submitted by: luiz Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/sdhci/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sdhci/sdhci.c b/sys/dev/sdhci/sdhci.c index d075c2e0500..573e6949b57 100644 --- a/sys/dev/sdhci/sdhci.c +++ b/sys/dev/sdhci/sdhci.c @@ -2078,8 +2078,8 @@ sdhci_generic_release_host(device_t brdev __unused, device_t reqdev) /* Deactivate led. */ WR1(slot, SDHCI_HOST_CONTROL, slot->hostctrl &= ~SDHCI_CTRL_LED); slot->bus_busy--; - SDHCI_UNLOCK(slot); wakeup(slot); + SDHCI_UNLOCK(slot); return (0); }