Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\msgutil.c Create Date:2022-07-28 16:52:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:load_msg

Proto:struct msg_msg *load_msg(const void __user *src, size_t len)

Type:struct msg_msg

Parameter:

TypeParameterName
const void __user *src
size_tlen
88  err = -EFAULT
91  msg = alloc_msg(len)
92  If (msg == NULL) Then Return ERR_PTR( - ENOMEM)
95  alen = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(len, DATALEN_MSG)
96  If copy_from_user(msg + 1, src, alen) Then Go to out_err
99  When seg != NULL cycle
100  len -= alen
101  src = src + alen
102  alen = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(len, DATALEN_SEG)
103  If copy_from_user(seg + 1, src, alen) Then Go to out_err
107  err = security_msg_msg_alloc(msg)
108  If err Then Go to out_err
111  Return msg
113  out_err :
114  free_msg(msg)
115  Return ERR_PTR(err)
Caller
NameDescribe
do_msgsnd
do_mq_timedsend