Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:SYSCALL_DEFINE5

Proto:SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *, infop, int, options, struct rusage __user *, ru)

Type:

Parameter:Nothing

1553  struct waitid_info info = {status = 0}
1554  err = kernel_waitid(which, upid, & info, options, ru ? & r : NULL)
1555  signo = 0
1557  If err > 0 Then
1558  signo = SIGCHLD
1559  err = 0
1560  If ru && copy_to_user(ru, & r, sizeof(structrusage)) Then Return -EFAULT
1563  If Not infop Then Return err
1566  If Not The "unsafe" user accesses aren't really "unsafe", but the naming* is a big fat warning: you have to not only do the access_ok()* checking before using them, but you have to surround them with the* user_access_begin/end() pair. Then Return -EFAULT
1569  unsafe_put_user(signo, & si_signo, Efault)
1570  unsafe_put_user(0, & si_errno, Efault)
1571  unsafe_put_user(cause, & si_code, Efault)
1572  unsafe_put_user(pid, & si_pid, Efault)
1573  unsafe_put_user(uid, & si_uid, Efault)
1574  unsafe_put_user(status, & si_status, Efault)
1575  user_access_end()
1576  Return err
1577  Efault :
1578  user_access_end()
1579  Return -EFAULT