[PATCH] ia64: fixes for semtimedop() ia32-compat handling
Here are two fixes for the ia32-compatibility mode handling for the new semtimedop() system call for the ia64 architecture. The first problem was that treatment of user-mode calls to semtimedop() with a NULL 4th (struct timespec *) parameter was inconsistent with the behavior of the same executable on i386 and also with a natively compiled ia64 binary. A NULL 4th arg to semtimedop() should result in no timeout being used (like a straight semop() call) rather than in an EFAULT error. The second problem was that a legitimate semtimedop() with a timeout was also resulting in an EFAULT because the fetch of the internal timespec strucure by sys_semtimedop() from semtimedop32()'s kernel stack was treated as an invalid user-data reference. This requires temporarily switching the addressing limit with set_fs(), further requiring that appropriate parameter checking by performed prior to the switch. The const qualifier was removed from the (struct compat_timespec *) arg to semtimedop32() so that the call to get_compat_timespec() wouldn't generate a compilation warning.
Showing
Please register or sign in to comment