Re: [PATCH/RFC] Futex mmap_sem deadlock

From: Linus Torvalds
Date: Wed Feb 23 2005 - 17:05:01 EST




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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/