Fix memcpy

This commit is contained in:
Vadim Vetrov
2024-09-19 22:28:32 +03:00
parent 5415bc37ec
commit 2fd3107401
3 changed files with 7 additions and 18 deletions

View File

@@ -93,7 +93,7 @@ typedef __u64 uint64_t;
*/
#ifdef KERNEL_SPACE
#include <linux/gfp.h>
#define NETBUF_ALLOC(buf, buf_len) __u8* buf = kmalloc(buf_len, GFP_ATOMIC);
#define NETBUF_ALLOC(buf, buf_len) __u8* buf = kmalloc(buf_len, GFP_KERNEL);
#define NETBUF_CHECK(buf) ((buf) != NULL)
#define NETBUF_FREE(buf) kfree(buf);
#elif defined(ALLOC_MALLOC)