mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 22:35:33 +00:00
fault_inject: use SIGKILL instead of BUG() to kill itself
If a process calls BUG(), it genereates a core file and we get a false warning from abrtd. Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
@@ -1286,7 +1286,7 @@ static int dump_one_task(struct pstree_item *item)
|
|||||||
|
|
||||||
if (fault_injected(FI_DUMP_EARLY)) {
|
if (fault_injected(FI_DUMP_EARLY)) {
|
||||||
pr_info("fault: CRIU sudden detach\n");
|
pr_info("fault: CRIU sudden detach\n");
|
||||||
BUG();
|
kill(getpid(), SIGKILL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (root_ns_mask & CLONE_NEWPID && root_item == item) {
|
if (root_ns_mask & CLONE_NEWPID && root_item == item) {
|
||||||
|
@@ -1615,7 +1615,7 @@ static int restore_task_with_children(void *_arg)
|
|||||||
|
|
||||||
if (fault_injected(FI_RESTORE_ROOT_ONLY)) {
|
if (fault_injected(FI_RESTORE_ROOT_ONLY)) {
|
||||||
pr_info("fault: Restore root task failure!\n");
|
pr_info("fault: Restore root task failure!\n");
|
||||||
BUG();
|
kill(getpid(), SIGKILL);
|
||||||
}
|
}
|
||||||
|
|
||||||
timing_start(TIME_FORK);
|
timing_start(TIME_FORK);
|
||||||
|
@@ -1609,7 +1609,7 @@ int open_path(struct file_desc *d,
|
|||||||
if (rfi->remap) {
|
if (rfi->remap) {
|
||||||
if (fault_injected(FI_RESTORE_OPEN_LINK_REMAP)) {
|
if (fault_injected(FI_RESTORE_OPEN_LINK_REMAP)) {
|
||||||
pr_info("fault: Open link-remap failure!\n");
|
pr_info("fault: Open link-remap failure!\n");
|
||||||
BUG();
|
kill(getpid(), SIGKILL);
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_lock(remap_open_lock);
|
mutex_lock(remap_open_lock);
|
||||||
|
Reference in New Issue
Block a user