From owner-svn-src-head@freebsd.org Mon Nov 30 17:16:53 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B66CA3CB50; Mon, 30 Nov 2015 17:16:53 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03AC41EF9; Mon, 30 Nov 2015 17:16:52 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUHGqo1092247; Mon, 30 Nov 2015 17:16:52 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUHGqk4092246; Mon, 30 Nov 2015 17:16:52 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201511301716.tAUHGqk4092246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 30 Nov 2015 17:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291493 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 17:16:53 -0000 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);