mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Call WITNESS_WARN() in callout_drain() to check whether any locks are
being held before sleeping. This has bitten me (in ath(4)) once before and I'd like to see this not bite anyone else. Differential Revision: D1638 Reviewed by: jhb, hselasky MFC after: 1 week
This commit is contained in:
parent
e505aef3ed
commit
9500dd9f0b
1 changed files with 4 additions and 0 deletions
|
|
@ -1096,6 +1096,10 @@ _callout_stop_safe(struct callout *c, int safe)
|
|||
struct lock_class *class;
|
||||
int direct, sq_locked, use_lock;
|
||||
|
||||
if (safe)
|
||||
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock,
|
||||
"calling %s", __func__);
|
||||
|
||||
/*
|
||||
* Some old subsystems don't hold Giant while running a callout_stop(),
|
||||
* so just discard this check for the moment.
|
||||
|
|
|
|||
Loading…
Reference in a new issue