Skip to contentSkip to conversation

c/r: prctl: Move PR_GET_TID_ADDRESS to a proper place

PATCH In review Cyrill Gorcunov 2 participants 2 messages Jun 15, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 c/r: prctl: Move PR_GET_TID_ADDRESS to a proper place

During merging of PR_GET_TID_ADDRESS patch the code has been misplaced (it happened to appear under PR_MCE_KILL) in result noone can use this option.

Fix it by moving code snippet to a proper place.

Cc Kees Cook <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Pavel Emelyanov <[email protected]>
Cc Andrey Vagin <[email protected]>
Cc Serge Hallyn <[email protected]>
Cc KAMEZAWA Hiroyuki <[email protected]>
Cc Andrew Morton <[email protected]>

---

Andrew, I think it get misplaced during merging (the former patch I sent has this snippet at the proper place). I noticed this problem only when found that our test suite swears at me with futex test case.

Anyway, there is nothing critical in this issue, it behaves like someone has disabled PR_GET_TID_ADDRESS.

The patch is on top of v3.5-rc2

 kernel/sys.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/sys.c +3 -3
Index: linux-2.6.git/kernel/sys.c
===================================================================
@@ -2127,9 +2127,6 @@ SYSCALL_DEFINE5(prctl, int, option, unsi
 				else
 					return -EINVAL;
 				break;
-		case PR_GET_TID_ADDRESS:
-			error = prctl_get_tid_address(me, (int __user **)arg2);
-			break;
 			default:
 				return -EINVAL;
 			}
@@ -2147,6 +2144,9 @@ SYSCALL_DEFINE5(prctl, int, option, unsi
 		case PR_SET_MM:
 			error = prctl_set_mm(arg2, arg3, arg4, arg5);
 			break;
+		case PR_GET_TID_ADDRESS:
+			error = prctl_get_tid_address(me, (int __user **)arg2);
+			break;
 		case PR_SET_CHILD_SUBREAPER:
 			me->signal->is_child_subreaper = !!arg2;
 			error = 0;
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Cyrill Gorcunov

During merging of PR_GET_TID_ADDRESS patch the code has been misplaced (it happened to appear under PR_MCE_KILL) in result noone can use this option.

Fix it by moving code snippet to a proper place.

Good catch!

Signature · 2 lines
Kees Cook
Chrome OS Security