kernel: Replace kmalloc() usages with kzalloc() (#2939)

This ensures we won't use uninitialized pointers for task work.
This commit is contained in:
Wang Han
2025-11-16 15:17:55 +08:00
committed by ShirkNeko
parent a4a9df3a25
commit 25fbc22f66
7 changed files with 13 additions and 12 deletions

View File

@@ -156,7 +156,7 @@ int ksu_handle_umount(uid_t old_uid, uid_t new_uid)
// umount the target mnt
pr_info("handle umount for uid: %d, pid: %d\n", new_uid, current->pid);
tw = kmalloc(sizeof(*tw), GFP_ATOMIC);
tw = kzalloc(sizeof(*tw), GFP_ATOMIC);
if (!tw)
return 0;