[SPARC64]: Mask off stack ptr in alloc_user_space() for 32-bit.

Linux Kernel Mailing List <[email protected]>
Newsgroups gmane.linux.kernel.commits.2-4
Message-ID <[email protected]>
ChangeSet 1.1539.3.4, 2005/02/07 20:24:13-08:00, [email protected]

	[SPARC64]: Mask off stack ptr in alloc_user_space() for 32-bit.
	
	Signed-off-by: David S. Miller <[email protected]>



 ioctl32.c     |    2 ++
 sys_sparc32.c |    2 ++
 2 files changed, 4 insertions(+)


diff -Nru a/arch/sparc64/kernel/ioctl32.c b/arch/sparc64/kernel/ioctl32.c
--- a/arch/sparc64/kernel/ioctl32.c	2005-02-09 09:08:32 -08:00
+++ b/arch/sparc64/kernel/ioctl32.c	2005-02-09 09:08:32 -08:00
@@ -562,6 +562,8 @@
 
 	if (!(current->thread.flags & SPARC_FLAG_32BIT))
 		usp += STACK_BIAS;
+	else
+		usp &= 0xffffffffUL;
 
 	return (void *) (usp - len);
 }
diff -Nru a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
--- a/arch/sparc64/kernel/sys_sparc32.c	2005-02-09 09:08:32 -08:00
+++ b/arch/sparc64/kernel/sys_sparc32.c	2005-02-09 09:08:32 -08:00
@@ -770,6 +770,8 @@
 
 	if (!(current->thread.flags & SPARC_FLAG_32BIT))
 		usp += STACK_BIAS;
+	else
+		usp &= 0xffffffffUL;
 
 	return (void *) (usp - len);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.