在futex_wake_op functionLinux 内核源代码中的 futex.c 中,我试图了解控件是如何到达这一点的。这发生在上述函数中,futex_atomic_op_inuser返回 -EFAULT,但它uaddr2是可写的。
但是从 的来源,futex_atomic_op_inuser我看到它仅在 上返回 -EFAULT if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))。
futex_atomic_op_inuser反过来调用__futex_atomic_op宏,我在代码中看到 -EFAULT 但我被告知 EFAULT 的路径不涉及调用__futex_atomic_op
控制如何达到上述点(即if (!fshared)goto retry_private ;)then?
提前致谢!