Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:aligned_vwrite

Proto:static int aligned_vwrite(char *buf, char *addr, unsigned long count)

Type:int

Parameter:

TypeParameterName
char *buf
char *addr
unsigned longcount
2857  copied = 0
2859  When count cycle
2862  offset = offset_in_page(addr)
2863  length = PAGE_SIZE - offset
2864  If length > count Then length = count
2866  p = Walk a vmap address to the struct page it maps.
2874  If p Then
2879  map = kmap_atomic(p)
2883  addr += length
2884  buf += length
2885  copied += length
2886  count -= length
2888  Return copied
Caller
NameDescribe
vwritevwrite() - write vmalloc area in a safe way.*@buf: buffer for source data*@addr: vm address.*@count: number of bytes to be read.* This function checks that addr is a valid vmalloc'ed area, and* copy data from a buffer to the given addr