Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108551241
D36959.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
600 B
Referenced Files
None
Subscribers
None
D36959.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h
--- a/sys/compat/linuxkpi/common/include/linux/slab.h
+++ b/sys/compat/linuxkpi/common/include/linux/slab.h
@@ -178,6 +178,16 @@
return (realloc(ptr, size, M_KMALLOC, linux_check_m_flags(flags)));
}
+static inline void *
+krealloc_array(void *ptr, size_t n, size_t size, gfp_t flags)
+{
+ if (WOULD_OVERFLOW(n, size)) {
+ return NULL;
+ }
+
+ return (realloc(ptr, n * size, M_KMALLOC, linux_check_m_flags(flags)));
+}
+
extern void linux_kfree_async(void *);
static inline void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 6:17 AM (2 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16188123
Default Alt Text
D36959.diff (600 B)
Attached To
Mode
D36959: linuxkpi: Add `krealloc_array()`
Attached
Detach File
Event Timeline
Log In to Comment