Re: [PATCH/RFC] Futex mmap_sem deadlock

Linus Torvalds
2005-02-23T22:01:33Z

On Wed, 23 Feb 2005, Olof Johansson wrote:
>
> How's this? I went with get_val_no_fault(), since it isn't really a
> get_user.*() any more (ptr being passed in), and no_paging is a little
> misleading (not all faults are due to paging).

Applied with minor cosmetic changes. I'm like a dog who likes to pee on
things to show his territory, so I changed "get_val_no_fault" to
"get_futex_value_locked", and I made sure that the return value is
sensible (return 0 or -EFAULT rather than the "__memcpy_from_user()"
return value which is how many bytes we couldn't copy).

Not that we care (we just check the return value against zero anyway,
which is success in both cases), but the compiler should be able to
optimize it away, and it might avoid some confusion down the line..

Linus