Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\mqueue.c Create Date:2022-07-28 16:51:53
Last Modify:2020-03-17 23:00:47 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Notes: the case when user wants us to deregister (with NULL as pointer)* and he isn't currently owner of notification, will be silently discarded.* It isn't explicitly defined in the POSIX.

Proto:static int do_mq_notify(mqd_t mqdes, const struct sigevent *notification)

Type:int

Parameter:

TypeParameterName
mqd_tmqdes
const struct sigevent *notification
1225  audit_mq_notify(mqdes, notification)
1227  nc = NULL
1228  sock = NULL
1229  If (notification != NULL) Then
1230  If Value for the false possibility is greater at compile time(sigev_notify != her notification: meaningless && sigev_notify != ify via signal && sigev_notify != deliver via thread creation ) Then Return -EINVAL
1236  Return -EINVAL
1243  If Not nc Then Return -ENOMEM
1249  ret = -EFAULT
1250  Go to free_skb
1256  retry :
1257  f = fdget(sigev_signo)
1258  If Not file Then
1259  ret = -EBADF
1260  Go to out
1263  fdput(f)
1264  If IS_ERR(sock) Then
1265  ret = PTR_ERR(sock)
1266  Go to free_skb
1270  ret = netlink_attachskb(sock, nc, & timeo, NULL)
1271  If ret == 1 Then
1272  sock = NULL
1273  Go to retry
1275  If ret Then Return ret
1280  f = fdget(mqdes)
1281  If Not file Then
1282  ret = -EBADF
1283  Go to out
1286  inode = file_inode(file)
1287  If Value for the false possibility is greater at compile time(f_op != & mqueue_file_operations) Then
1288  ret = -EBADF
1289  Go to out_fput
1291  info = MQUEUE_I(inode)
1293  ret = 0
1294  spin_lock( & lock)
1295  If (notification == NULL) Then
1300  Else if (notify_owner != NULL) Then
1301  ret = -EBUSY
1302  Else
1306  Break
1308  notify_sock = sock
1309  notify_cookie = nc
1310  sock = NULL
1311  nc = NULL
1313  Break
1318  Break
1321  notify_owner = get_pid(task_tgid(current process))
1322  notify_user_ns = get_user_ns(current_user_ns())
1323  i_atime = i_ctime = current_time(inode)
1325  spin_unlock( & lock)
1326  out_fput :
1327  fdput(f)
1328  out :
1329  If sock Then netlink_detachskb(sock, nc)
1331  Else free_skb :
1333  dev_kfree_skb(nc)
1335  Return ret
Caller
NameDescribe
SYSCALL_DEFINE2
COMPAT_SYSCALL_DEFINE2