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_pil...@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++;
                }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to