Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_proc_douintvec_w

Proto:static int do_proc_douintvec_w(unsigned int *tbl_data, struct ctl_table *table, void __user *buffer, size_t *lenp, loff_t *ppos, int (*conv)(unsigned long *lvalp, unsigned int *valp, int write, void *data), void *data)

Type:int

Parameter:

TypeParameterName
unsigned int *tbl_data
struct ctl_table *table
void __user *buffer
size_t *lenp
loff_t *ppos
int (*conv
void *data
2435  err = 0
2438  kbuf = NULL
2440  left = lenp
2442  If proc_first_pos_non_zero_ignore - check if first position is allowed*@ppos: file position*@table: the sysctl table* Returns true if the first position is non-zero and the sysctl_writes_strict* mode indicates this is not allowed for numeric input types Then Go to bail_early
2445  If left > PAGE_SIZE - 1 Then left = PAGE_SIZE - 1
2448  p = kbuf = memdup_user_nul(buffer, left)
2449  If IS_ERR(kbuf) Then Return -EINVAL
2452  left -= proc_skip_spaces( & p)
2453  If Not left Then
2454  err = -EINVAL
2455  Go to out_free
2458  err = proc_get_long - reads an ASCII formatted integer from a user buffer*@buf: a kernel buffer*@size: size of the kernel buffer*@val: this is where the number will be stored*@neg: set to %TRUE if number is negative*@perm_tr: a vector which contains the allowed
2461  If err || neg Then
2462  err = -EINVAL
2463  Go to out_free
2466  If conv( & lval, tbl_data, 1, data) Then
2467  err = -EINVAL
2468  Go to out_free
2471  If Not err && left Then left -= proc_skip_spaces( & p)
2474  out_free :
2475  free previously allocated memory
2476  If err Then Return -EINVAL
2479  Return 0
2482  bail_early :
2483  ppos += lenp
2484  Return err
Caller
NameDescribe
__do_proc_douintvec