Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mempolicy.c Create Date:2022-07-28 15:32:06
Last Modify:2020-03-17 22:28:11 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Copy a kernel node mask to user space

Proto:static int copy_nodes_to_user(unsigned long __user *mask, unsigned long maxnode, nodemask_t *nodes)

Type:int

Parameter:

TypeParameterName
unsigned long __user *mask
unsigned longmaxnode
nodemask_t *nodes
1406  copy = @a is a power of 2 value (maxnode - 1, 64) / 8
1407  nbytes = BITS_TO_LONGS(nr_node_ids) * sizeof(long)
1409  If copy > nbytes Then
1410  If copy > PAGE_SIZE Then Return -EINVAL
1412  If lear_user - Zero a block of memory in user space.*@to: Destination address, in user space.*@n: Number of bytes to zero.* Zero a block of memory in user space.* Return: number of bytes that could not be cleared.* On success, this will be zero. Then Return -EFAULT
1414  copy = nbytes
1416  Return If copy_to_user(mask, nodes_addr( * nodes), copy) Then -EFAULT Else 0
Caller
NameDescribe
kernel_get_mempolicyRetrieve NUMA policy