Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\util.c Create Date:2022-07-28 14:21:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:vmemdup_user - duplicate memory region from user space*@src: source address in user space*@len: number of bytes to copy* Return: an ERR_PTR() on failure. Result may be not* physically contiguous. Use kvfree() to free.

Proto:void *vmemdup_user(const void __user *src, size_t len)

Type:void

Parameter:

TypeParameterName
const void __user *src
size_tlen
198  p = kvmalloc(len, GFP_USER)
199  If Not p Then Return ERR_PTR( - ENOMEM)
202  If copy_from_user(p, src, len) Then
203  kvfree() - Free memory.*@addr: Pointer to allocated memory.* kvfree frees memory allocated by any of vmalloc(), kmalloc() or kvmalloc().* It is slightly more efficient to use kfree() or vfree() if you are certain* that you know which one to use.
204  Return ERR_PTR( - EFAULT)
207  Return p