]> git.ozlabs.org Git - petitboot/commit
process: Cancel all asynchronous jobs on reinit v1.4.1
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>
Mon, 23 Jan 2017 03:53:32 +0000 (14:53 +1100)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 31 Jan 2017 02:18:38 +0000 (13:18 +1100)
commitd94bb8c48f42678a5f1cf0041429b82aa1938540
tree37e8fad4895c077a282e62a88a05729299724e4b
parent75e89298319041ac2cc96102c8345dc175e5e0db
process: Cancel all asynchronous jobs on reinit

If an asynchronous job is running over a reinit, the process can return
and run its callback function after the reinit. This becomes a problem
if the callback function accesses pointers that were only valid before
the reinit (eg. device structs).
If a reinit is requested explicitly stop all active asynchronous jobs
and clear their callback functions before the reinit.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
discover/device-handler.c
lib/process/process.c
lib/process/process.h