Skip to contentSkip to conversation

change compat shmget size arg to signed

PATCH New Olaf Hering 1 participant 1 message Feb 20, 2006 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 change compat shmget size arg to signed

change second arg (the 'size') to signed to handle a size of -1. ltp test shmget02 fails. This patch fixes it.
Oddly, we see the failure only on a POWER4 LPAR with 4.6G ram.

 arch/powerpc/kernel/sys_ppc32.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/sys_ppc32.c +1 -1
Index: linux-2.6.16-rc4-olh/arch/powerpc/kernel/sys_ppc32.c
===================================================================
@@ -429,7 +429,7 @@ long compat_sys_ipc(u32 call, u32 first,
 		return sys_shmdt(compat_ptr(ptr));
 	case SHMGET:
 		/* sign extend key_t */
-		return sys_shmget((int)first, second, third);
+		return sys_shmget((int)first, (int)second, third);
 	case SHMCTL:
 		/* sign extend shmid */
 		return compat_sys_shmctl((int)first, second, compat_ptr(ptr));