--- zzzz-none-000/linux-5.4.213/drivers/base/cpu.c 2022-09-15 10:04:56.000000000 +0000 +++ miami-7690-761/linux-5.4.213/drivers/base/cpu.c 2024-05-29 11:19:50.000000000 +0000 @@ -20,6 +20,7 @@ #include #include #include +#include #include "base.h" @@ -340,11 +341,20 @@ static int cpu_uevent(struct device *dev, struct kobj_uevent_env *env) { - char *buf = kzalloc(PAGE_SIZE, GFP_KERNEL); + int size = PAGE_SIZE; + char *buf = NULL, *tbuf = NULL; + unsigned long addr = 0; +#ifdef CONFIG_SLUB_DEBUG + size = PAGE_SIZE+(PAGE_SIZE - 1); +#endif + buf = kzalloc(size, GFP_KERNEL); if (buf) { + tbuf = buf; + addr = PAGE_ALIGN((unsigned long)buf); + buf = (char *)addr; print_cpu_modalias(NULL, NULL, buf); add_uevent_var(env, "MODALIAS=%s", buf); - kfree(buf); + kfree(tbuf); } return 0; }