git: 6d042d7c861a - main - wpi: Fix a lock leak in an error path in wpi_run()

Mark Johnston markj at FreeBSD.org
Fri Sep 10 14:05:12 UTC 2021


The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=6d042d7c861a8fffd1784c720720c3b89c7c0883

commit 6d042d7c861a8fffd1784c720720c3b89c7c0883
Author:     Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-09-10 14:03:51 +0000
Commit:     Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-09-10 14:03:51 +0000

    wpi: Fix a lock leak in an error path in wpi_run()
    
    PR:             258243
    Reported by:    dinghao.liu at zju.edu.cn
    MFC after:      1 week
---
 sys/dev/wpi/if_wpi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c
index dd8b17c8d21c..3d4e80ab61ad 100644
--- a/sys/dev/wpi/if_wpi.c
+++ b/sys/dev/wpi/if_wpi.c
@@ -4547,6 +4547,7 @@ wpi_run(struct wpi_softc *sc, struct ieee80211vap *vap)
 	    sc->rxon.chan, sc->rxon.flags);
 
 	if ((error = wpi_send_rxon(sc, 0, 1)) != 0) {
+		WPI_RXON_UNLOCK(sc);
 		device_printf(sc->sc_dev, "%s: could not send RXON\n",
 		    __func__);
 		return error;


More information about the dev-commits-src-all mailing list