Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/freebsd-src.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/compat/linuxkpi/common/include/linux/slab.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h
index 16b5afcea693..8f1cb433c36b 100644
--- a/sys/compat/linuxkpi/common/include/linux/slab.h
+++ b/sys/compat/linuxkpi/common/include/linux/slab.h
@@ -178,6 +178,16 @@ krealloc(void *ptr, size_t size, gfp_t flags)
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