Resource-managed kmemdup
void * devm_kmemdup(struct device * dev, const void * src, size_t len, gfp_t gfp);
dev
Device this memory belongs to
src
Memory region to duplicate
len
Memory region length
gfp
GFP mask to use
Duplicate region of a memory using resource managed kmalloc