svn commit: r334768 - stable/11/sys/compat/linuxkpi/common/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Jun 7 07:48:27 UTC 2018
Author: hselasky
Date: Thu Jun 7 07:48:26 2018
New Revision: 334768
URL: https://svnweb.freebsd.org/changeset/base/334768
Log:
MFC r334428:
Implement support for the kvmalloc_array() function in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0 at gmail.com>
Sponsored by: Mellanox Technologies
Modified:
stable/11/sys/compat/linuxkpi/common/include/linux/slab.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/compat/linuxkpi/common/include/linux/slab.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/slab.h Thu Jun 7 07:47:32 2018 (r334767)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/slab.h Thu Jun 7 07:48:26 2018 (r334768)
@@ -132,6 +132,12 @@ kmalloc_array(size_t n, size_t size, gfp_t flags)
}
static inline void *
+kvmalloc_array(size_t n, size_t size, gfp_t flags)
+{
+ return (mallocarray(n, size, M_KMALLOC, linux_check_m_flags(flags)));
+}
+
+static inline void *
krealloc(void *ptr, size_t size, gfp_t flags)
{
return (realloc(ptr, size, M_KMALLOC, linux_check_m_flags(flags)));
More information about the svn-src-stable-11
mailing list