| Age | Commit message (Collapse) | Author |
|
|
|
Mostly done with spatch with touchups for indentation
@@
expression a;
identifier b,c,d;
identifier p;
@@
const struct filterops p =
- { a, b, c, d
+ {
+ .f_isfd = a,
+ .f_attach = b,
+ .f_detach = c,
+ .f_event = d,
};
|
|
queries or modifications of the state with the sme_mtx mutex.
Detach the rndsrc before re-attaching it (with potentially new values).
Clean up some lock-ordering issues.
And a couple of KNF issues for good measure!
Should address PR kern/52533
XXX Pullup-8 along with the previous fixes from msaitoh@
XXX http://mail-index.netbsd.org/source-changes/2017/09/06/msg088028.html
~
~
|
|
use sysmon_envsys sleep waiting at "rndsrc" when "drvctl -d".
Don't call rnd_detach_source() in sme_remove_event() which is called
from sme_event_unregister_all(). Instead, call rnd_detach_source() in
sysmon_envsys_sensor_detach() and call sysmon_envsys_sensor_detach()
before sme_event_unregister_sensor(). Each sensor(envsys_data) has each
rnd_src, but some sme_events point to the same rnd_src in a sensor.
Calling rnd_detach_souce() twice with the same rnd_src brokes a reference
count in rnd_src. OK'd by pgoyette@.
|
|
kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()
all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
|
|
initialized before we configure/initialize any devices that interact
with them.
Thanks, marty!
|
|
multiple sensors.
|
|
https://mail-index.netbsd.org/tech-kern/2015/10/14/msg019511.html
don't sleep on sme->sme_mtx in the callout but use mutex_tryenter()
and just reschedule the callout if we can't get the mutex now.
This fixes a deadlock which can happen if the backed wants to
sleep with timeout (e.g. cv_timedwait()) as the backed is called with
sme->sme_mtx held.
This is a stopgap measure for netbsd-7; sysmon should be changed to not
sleep (or call a backend which will sleep) with mutexes held.
|
|
|
|
one occurred.
|
|
n ot just that one or the other is non-NULL!
|
|
|
|
code is only called once for built-in variants of the module.
|
|
Thanks, christos!
|
|
While here, remove some parens around a return value.
|
|
of overwriting with ENODEV.
Thanks, christos!
|
|
open routine. Just return an error.
Hopefully this will fix the recently reported issues with atf tests
running on xen guest.
|
|
Remove auto_configure(9) goop from sysmon device. It does make things
a bit cleaner, and also reduces source code by about 10%.
Tested via QEMU with no obvious side-effects.
|
|
be called from sysmon_envsys_register() early.
|
|
|
|
|
|
|
|
|
|
|
|
can properly suspend the system.
Thanks, mrg, for pointing this out.
|
|
|
|
|
|
|
|
|
|
sensor events to userland).
|
|
already included by config. So, for built-in sysmon module we don't
need to add the cdevsw to the table.
|
|
|
|
|
|
sysmon_task_queue_fini() function to have a non-void type.
|
|
|
|
sysmon components.
|
|
|
|
|
|
|
|
Confirmed that atf tests (which run via rump) still pass, and also
confirmed that panic/reboot work in both monolithic kernel and
loaded module.
|
|
|
|
|
|
|
|
Found by Brainy, reported by maxv@.
|
|
Protect this counter with a new short time lock "sme_work_mtx" and
keep "sme_mtx" as long time lock.
Removes a deadlock where an active event holds "sme_mtx", the callout
"sme_events_check" blocks on "sme_mtx" and callout processing stops.
|
|
to be used to report to userland hardware radio switch changes.
powerd(8) will call a "radio_button" script to handle the event.
This script can e.g. start or stop wpa_supplicant.
Update wpi(4) to report PSWITCH_TYPE_RADIO events to sysmon.
|
|
workqueue_destroy may sleep so we shouldn't run it with holding a mutex.
Requested by riastradh@.
|
|
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
In this case, we need to pass an interlock to callout_halt to wait for
the callout complete. And also we make sure that SME_CALLOUT_INITIALIZED
is unset before calling callout_halt to prevent the callout from calling
callout_schedule. This is the same as what we did in sys/netinet6/mld6.c@1.61.
Reviewed by riastradh@.
|
|
We can use sme_mtx for the callout as well. Actually we should do so
because sme_events_list and some other data that are touched in the
callout should be protected by sme_mtx, not sme_callout_mtx.
Discussed with riastradh@ in http://mail-index.netbsd.org/tech-kern/2014/11/11/msg017956.html
|
|
intentional, even if it is always true in case of the arrays.
|