Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Nov 2015 17:16:52 +0000 (UTC)
From:      Andriy Voskoboinyk <avos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r291493 - head/sys/dev/wpi
Message-ID:  <201511301716.tAUHGqk4092246@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avos
Date: Mon Nov 30 17:16:51 2015
New Revision: 291493
URL: https://svnweb.freebsd.org/changeset/base/291493

Log:
  wpi: ignore ic_update_promisc() call when device is not running
  
  This change will fix kernel panic with uninitialized (zeroed)
  RXON structure.
  
  Tested with Intel 3945BG, IBSS mode.
  
  Approved by:	adrian (mentor)
  Differential Revision:	https://reviews.freebsd.org/D4304

Modified:
  head/sys/dev/wpi/if_wpi.c

Modified: head/sys/dev/wpi/if_wpi.c
==============================================================================
--- head/sys/dev/wpi/if_wpi.c	Mon Nov 30 17:09:25 2015	(r291492)
+++ head/sys/dev/wpi/if_wpi.c	Mon Nov 30 17:16:51 2015	(r291493)
@@ -3556,6 +3556,13 @@ wpi_update_promisc(struct ieee80211com *
 {
 	struct wpi_softc *sc = ic->ic_softc;
 
+	WPI_LOCK(sc);
+	if (sc->sc_running == 0) {
+		WPI_UNLOCK(sc);
+		return;
+	}
+	WPI_UNLOCK(sc);
+
 	WPI_RXON_LOCK(sc);
 	wpi_set_promisc(sc);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511301716.tAUHGqk4092246>