mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 21:55:20 +00:00
vmm: Fix panic in SIGWINCH listener thread when no seccomp filter set
When running with `--serial pty --console pty --seccomp=false` the SIGWICH listener thread would panic as the seccomp filter was empty. Adopt the mechanism used in the rest of the code and check for non-empty filter before trying to apply it. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
5813ce0307
commit
66a2045148
@ -67,7 +67,9 @@ fn sigwinch_listener_main(seccomp_filter: BpfProgram, tx: File, tty: &File) -> !
|
||||
|
||||
unblock_all_signals().unwrap();
|
||||
|
||||
apply_filter(&seccomp_filter).unwrap();
|
||||
if !seccomp_filter.is_empty() {
|
||||
apply_filter(&seccomp_filter).unwrap();
|
||||
}
|
||||
|
||||
register_signal_handler(SIGWINCH, sigwinch_handler).unwrap();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user