Author: gonzo
Date: Tue Aug 30 01:31:03 2016
New Revision: 305039
URL: https://svnweb.freebsd.org/changeset/base/305039

Log:
  Fix TI PRUSS driver panic with INVARIANTS enabled
  
  Value passed as islocked argument to knlist_add should
  be consistent with actual lock state so add lock/unlock
  calls around knlist_add
  
  PR:           212120
  Submitted by: Manuel Stuhn

Modified:
  head/sys/arm/ti/ti_pruss.c

Modified: head/sys/arm/ti/ti_pruss.c
==============================================================================
--- head/sys/arm/ti/ti_pruss.c  Tue Aug 30 01:01:41 2016        (r305038)
+++ head/sys/arm/ti/ti_pruss.c  Tue Aug 30 01:31:03 2016        (r305039)
@@ -310,7 +310,9 @@ ti_pruss_kqfilter(struct cdev *cdev, str
        case EVFILT_READ:
                kn->kn_hook = sc;
                kn->kn_fop = &ti_pruss_kq_read;
+               mtx_lock(&sc->sc_mtx);
                knlist_add(&sc->sc_selinfo.si_note, kn, 1);
+               mtx_unlock(&sc->sc_mtx);
                break;
        default:
                return (EINVAL);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to