kernel: fix wrong args

This commit is contained in:
weishu
2022-12-26 15:08:13 +07:00
parent c2d3eaeccd
commit 0661dda164

View File

@@ -1,3 +1,4 @@
#include "linux/gfp.h"
#include "linux/uidgid.h" #include "linux/uidgid.h"
#include <linux/cpu.h> #include <linux/cpu.h>
#include <linux/memory.h> #include <linux/memory.h>
@@ -105,7 +106,7 @@ static bool become_manager(char* pkg) {
return true; return true;
} }
buf = (char *) kmalloc(GFP_KERNEL, PATH_MAX); buf = (char *) kmalloc(PATH_MAX, GFP_ATOMIC);
if (!buf) { if (!buf) {
pr_err("kalloc path failed.\n"); pr_err("kalloc path failed.\n");
return false; return false;