Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\xattr.c Create Date:2022-07-28 20:10:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Extended attribute LIST operations

Proto:static ssize_t listxattr(struct dentry *d, char __user *list, size_t size)

Type:ssize_t

Parameter:

TypeParameterName
struct dentry *d
char __user *list
size_tsize
608  char * klist = NULL
610  If size Then
611  If size > size of extended attribute namelist (64k) Then size = size of extended attribute namelist (64k)
613  klist = kvmalloc(size, GFP_KERNEL)
614  If Not klist Then Return -ENOMEM
618  error = vfs_listxattr(d, klist, size)
619  If error > 0 Then
620  If size && copy_to_user(list, klist, error) Then error = -EFAULT
622  Else if error == -ERANGE && size >= size of extended attribute namelist (64k) Then
625  error = -E2BIG
628  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.
630  Return error
Caller
NameDescribe
path_listxattr
SYSCALL_DEFINE3