x86 ptrace: disallow null cs/ss
authorRoland McGrath <roland@redhat.com>
Wed, 6 Feb 2008 21:39:44 +0000 (22:39 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 6 Feb 2008 21:39:44 +0000 (22:39 +0100)
commitc63855d04034c96db791a7217954c93aa66d24cb
tree97f22e5bf68de576cad776cd14921903f7d51449
parentc1f766b5519f9b5a51b0e6884ed9e02bce775ea8
x86 ptrace: disallow null cs/ss

In my revamp of the x86 ptrace code for setting register values,
I accidentally omitted a check that was there in the old code.
Allowing %cs to be 0 causes a bad crash in recovery from iret failure.
This patch fixes that regression against 2.6.24, and adds a comment
that should help prevent this subtlety from being overlooked again.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/ptrace.c