Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Mar 2015 20:15:11 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r280055 - head/sys/dev/wpi
Message-ID:  <201503152015.t2FKFBan053594@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sun Mar 15 20:15:10 2015
New Revision: 280055
URL: https://svnweb.freebsd.org/changeset/base/280055

Log:
  Fix races between wpi_rx_done() and wpi_stop()
  
  PR:		kern/197143
  Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>

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

Modified: head/sys/dev/wpi/if_wpi.c
==============================================================================
--- head/sys/dev/wpi/if_wpi.c	Sun Mar 15 20:13:58 2015	(r280054)
+++ head/sys/dev/wpi/if_wpi.c	Sun Mar 15 20:15:10 2015	(r280055)
@@ -1952,6 +1952,12 @@ wpi_notif_intr(struct wpi_softc *sc)
 		case WPI_RX_DONE:
 			/* An 802.11 frame has been received. */
 			wpi_rx_done(sc, desc, data);
+
+			if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
+				/* wpi_stop() was called. */
+				return;
+			}
+
 			break;
 
 		case WPI_TX_DONE:



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