Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\futex.c Create Date:2022-07-28 10:54:58
Last Modify:2020-03-17 15:28:32 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Process a futex-list entry, check whether it's owned by the* dying task, and do notification if so:

Proto:static int handle_futex_death(unsigned int __user *uaddr, struct task_struct *curr, bool pi, bool pending_op)

Type:int

Parameter:

TypeParameterName
unsigned int __user *uaddr
struct task_struct *curr
boolpi
boolpending_op
3553  nval = nval
3557  If uaddr % size of uaddr != 0 Then Return -1
3560  retry :
3561  If Get a simple variable from user space(uval, uaddr) Then Return -1
3595  If pending_op && Not pi && Not uval Then
3596  Wake up waiters matching bitset queued on this futex (uaddr).
3597  Return 0
3600  If (uval & The rest of the robust-futex field is for the TID:) != task_pid_vnr(curr) Then Return 0
3613  mval = uval & Are there any waiters for this robust futex: | The kernel signals via this bit that a thread holding a futex* has exited without unlocking the futex. The kernel also does* a FUTEX_WAKE on such futexes, after setting the bit, to wake* up any possible waiters:
3624  If err = cmpxchg_futex_value_locked( & nval, uaddr, uval, mval) Then
3626  Case err == -EFAULT
3629  Go to retry
3631  Case err == -EAGAIN
3632  cond_resched()
3633  Go to retry
3635  Default
3636  WARN_ON_ONCE(1)
3637  Return err
3641  If nval != uval Then Go to retry
3648  If Not pi && uval & Are there any waiters for this robust futex: Then Wake up waiters matching bitset queued on this futex (uaddr).
3651  Return 0
Caller
NameDescribe
exit_robust_listWalk curr->robust_list (very carefully, it's a userspace list!)* and mark any locks found there dead, and notify any waiters.* We silently return on any sign of list-walking problem.
compat_exit_robust_list