kernel: fix put_task if alloc failed.

This commit is contained in:
weishu
2025-11-08 13:37:15 +00:00
committed by ShirkNeko
parent 22661c1838
commit 678c00cad9

View File

@@ -416,11 +416,12 @@ void persistent_allow_list()
kzalloc(sizeof(struct callback_head), GFP_KERNEL);
if (!cb) {
pr_err("save_allow_list alloc cb err\b");
return;
goto put_task;
}
cb->func = do_persistent_allow_list;
task_work_add(tsk, cb, TWA_RESUME);
put_task:
put_task_struct(tsk);
}