LinuxKPI: add kvmemdup()
authorBjoern A. Zeeb <bz@FreeBSD.org>
Mon, 13 May 2024 17:43:25 +0000 (17:43 +0000)
committerBjoern A. Zeeb <bz@FreeBSD.org>
Tue, 21 May 2024 22:14:50 +0000 (22:14 +0000)
commit8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf
tree4633ec1ae7e053d6c608ecc1f53e857210f5c169
parent69b6c4a6ec6654978628ccd48edce46f00ac3e96
LinuxKPI: add kvmemdup()

Add kvmemdup() as a variant of kmemdup().  While currently it could
just call kmemdup() we duplicate the code and use kvmalloc() in case
someone will change the implementation of kvmalloc/kvfree in slab.h.
This is used by an updated wireless driver.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D45181
sys/compat/linuxkpi/common/include/linux/string.h