Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147846256
D46656.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
618 B
Referenced Files
None
Subscribers
None
D46656.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D46656: LinuxKPI: make __kmalloc() play by the rules
Attached
Detach File
Event Timeline
Log In to Comment