Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/dev/pci



Module Name:    src
Committed By:   riastradh
Date:           Fri Oct 21 09:29:32 UTC 2022

Modified Files:
        src/sys/dev/pci: if_aq.c

Log Message:
aq(4): Remove incorrect ASSERT_SLEEPABLE introduced in 1.33.

It is true that aq_stop must be sleepable, and that aq_stop_locked
may sleep, but aq_stop_locked will release sc->sc_mutex when it
sleeps, which ASSERT_SLEEPABLE doesn't know about.  Since that is a
spin lock, ASSERT_SLEEPABLE trips over it and crashes.

This is not quite right: aq_stop should really only take the lock
over specific things that need the lock to synchronize with other
threads, like mii_down; aq_init and aq_stop are already serialized by
IFNET_LOCK.  sc->sc_mutex is used for too much and should have its
scope narrowed like I did recently in usbnet(9).  But this small
change will at least remove a source of crashes for now.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/pci/if_aq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index