Date: Thu, 7 Jun 2018 07:48:26 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r334768 - stable/11/sys/compat/linuxkpi/common/include/linux Message-ID: <201806070748.w577mQBw062284@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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)));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806070748.w577mQBw062284>