函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\mqueue.c Create Date:2022-07-27 18:27:04
Last Modify:2020-03-17 23:00:47 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:static int do_mq_notify(mqd_t mqdes, const struct sigevent *notification)

返回类型:int

参数:

类型参数名称
mqd_tmqdes
const struct sigevent *notification
1225  audit_mq_notify(mqdes, notification)
1227  nc = NULL
1228  sock = NULL
1229  如果(notification != NULL)则
1230  如果此条件成立可能性小(为编译器优化)(sigev_notify != her notification: meaningless && sigev_notify != ify via signal && sigev_notify != deliver via thread creation )则返回:负EINVAL
1236  返回:负EINVAL
1238  如果sigev_notify恒等于deliver via thread creation
1242  nc等于分配网络缓存
1243  如果非nc则返回:负ENOMEM
1249  ret等于负EFAULT
1250  转到:free_skb
1256  retry :
1257  f等于fdget(sigev_signo)
1258  如果非file
1259  ret等于负EBADF
1260  转到:out
1263  fdput(f)
1264  如果是错误
1265  ret等于错误
1266  转到:free_skb
1270  ret等于netlink_attachskb(sock, nc, & timeo, NULL)
1271  如果ret恒等于1则
1272  sock = NULL
1273  转到:retry
1275  如果ret则返回:ret
1280  f等于fdget(mqdes)
1281  如果非file
1282  ret等于负EBADF
1283  转到:out
1286  inode等于file_inode(file)
1287  如果此条件成立可能性小(为编译器优化)(f_op != & mqueue_file_operations)则
1288  ret等于负EBADF
1289  转到:out_fput
1291  info等于MQUEUE_I(inode)
1293  ret等于0
1294  加自旋锁
1295  如果(notification == NULL)则
1296  如果notify_owner恒等于task_tgid(当前进程)则
1298  i_atime等于i_ctime等于current_time(inode)
1300  否则如果(notify_owner != NULL)则
1301  ret等于负EBUSY
1302  否则
1306  退出
1308  notify_sock等于sock
1309  notify_cookie等于nc
1310  sock = NULL
1311  nc = NULL
1313  退出
1315  sigev_signo等于sigev_signo
1316  sigev_value等于sigev_value
1318  退出
1321  notify_owner等于get_pid(task_tgid(当前进程))
1322  notify_user_ns等于get_user_ns(current_user_ns())
1323  i_atime等于i_ctime等于current_time(inode)
1325  自旋锁解锁
1326  out_fput :
1327  fdput(f)
1328  out :
1329  如果socknetlink_detachskb(sock, nc)
1331  否则free_skb :
1333  dev_kfree_skb(nc)
1335  返回:ret
调用者
名称描述
SYSCALL_DEFINE2
COMPAT_SYSCALL_DEFINE2