Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Oct 2020 17:40:02 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r366733 - head/sys/dev/sound/pci/hda
Message-ID:  <202010151740.09FHe2KM006696@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Oct 15 17:40:02 2020
New Revision: 366733
URL: https://svnweb.freebsd.org/changeset/base/366733

Log:
  Drop unsolicited responses to the still attaching CODECs.
  
  It is reported to fix kernel panics when early unsolicited responses
  delivered to the CODEC device not having driver attached yet.
  
  PR:		250248
  Reported by:	Rajeev Pillai <rajeev_v_pillai@yahoo.com>
  Reviewed by:	avg
  MFC after:	2 weeks

Modified:
  head/sys/dev/sound/pci/hda/hdac.c

Modified: head/sys/dev/sound/pci/hda/hdac.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdac.c	Thu Oct 15 17:12:58 2020	(r366732)
+++ head/sys/dev/sound/pci/hda/hdac.c	Thu Oct 15 17:40:02 2020	(r366733)
@@ -990,7 +990,8 @@ hdac_unsolq_flush(struct hdac_softc *sc)
 			sc->unsolq_rp %= HDAC_UNSOLQ_MAX;
 			cad = sc->unsolq[sc->unsolq_rp++];
 			sc->unsolq_rp %= HDAC_UNSOLQ_MAX;
-			if ((child = sc->codecs[cad].dev) != NULL)
+			if ((child = sc->codecs[cad].dev) != NULL &&
+			    device_is_attached(child))
 				HDAC_UNSOL_INTR(child, resp);
 			ret++;
 		}



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