diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2016-09-01 14:32:03 +1000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2016-09-01 14:59:05 +1000 |
commit | a50d5fe279db71cf85fabeb675c99b167ec63dcb (patch) | |
tree | 2f7058badc87b030053ecb63c7312c3894ccf02c /discover/dt.h | |
parent | ccb478ac2e5b1e24ebb6af4130fdd37e1b36babb (diff) | |
download | talos-petitboot-a50d5fe279db71cf85fabeb675c99b167ec63dcb.tar.gz talos-petitboot-a50d5fe279db71cf85fabeb675c99b167ec63dcb.zip |
discover/event: Ensure event struct exists for async callers
When handling an event, user_event_handle_message() creates an event
struct with relevant parameters. Once user_event_handle_message() is
finished it frees the struct.
However in the case of a dhcp or add_url event, asynchronous jobs may be
spawned that will later reference the event struct. In particular this
becomes a problem when pxe_process_pair() handles an IPAPPEND name/value
pair and tries to access event->device.
In the case of dhcp and add_url events, we avoid this by changing the
event struct's talloc parent to the discover_context struct which
persists until all async pxe jobs have completed.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/dt.h')
0 files changed, 0 insertions, 0 deletions