Date: Thu, 31 May 2018 13:13:09 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334428 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <201805311313.w4VDD9Vv084669@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu May 31 13:13:08 2018 New Revision: 334428 URL: https://svnweb.freebsd.org/changeset/base/334428 Log: Implement support for the kvmalloc_array() function in the LinuxKPI. Submitted by: Johannes Lundberg <johalun0@gmail.com> MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/slab.h Modified: head/sys/compat/linuxkpi/common/include/linux/slab.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/slab.h Thu May 31 12:55:38 2018 (r334427) +++ head/sys/compat/linuxkpi/common/include/linux/slab.h Thu May 31 13:13:08 2018 (r334428) @@ -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)));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805311313.w4VDD9Vv084669>