Page MenuHomeFreeBSD

D46656.diff
No OneTemporary

D46656.diff

diff --git a/sys/compat/linuxkpi/common/src/linux_slab.c b/sys/compat/linuxkpi/common/src/linux_slab.c
--- a/sys/compat/linuxkpi/common/src/linux_slab.c
+++ b/sys/compat/linuxkpi/common/src/linux_slab.c
@@ -215,7 +215,11 @@
/* sizeof(struct llist_node) is used for kfree_async(). */
_s = MAX(size, sizeof(struct llist_node));
- return (malloc(_s, M_KMALLOC, linux_check_m_flags(flags)));
+ if (_s < PAGE_SIZE)
+ return (malloc(_s, M_KMALLOC, linux_check_m_flags(flags)));
+ else
+ return (contigmalloc(_s, M_KMALLOC, linux_check_m_flags(flags),
+ 0, -1UL, PAGE_SIZE, 0));
}
struct lkpi_kmalloc_ctx {

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 15, 3:39 AM (10 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29699993
Default Alt Text
D46656.diff (618 B)

Event Timeline