Skip to content

webrte-1.08

Choose a tag to compare

@github-actions github-actions released this 28 Aug 01:22
Take allproc_lock shared around every walk of the process list

proc_find_by_name, proc_find_by_pid and sys_proc_list all walked allproc with
no lock held. Launching an app while a walk was in flight powered the console
off, which is the list being modified underneath the walker.

Each walk now acquires allproc_lock shared once and releases it once, with no
return in between - leaking it would block every fork and exit on the system,
which is a hang rather than a reboot. Firmwares without the offsets mapped keep
the old unlocked behaviour, since the pointers are NULL there and the helpers
do nothing.

This closes the window during the walk. It does not make the returned proc
pointer safe to use after the lock is dropped; that needs PHOLD/PRELE.