diff options
Diffstat (limited to 'ipc/compat.c')
-rw-r--r-- | ipc/compat.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ipc/compat.c b/ipc/compat.c index a6df704f521e..53cebdf80e3c 100644 --- a/ipc/compat.c +++ b/ipc/compat.c | |||
@@ -514,6 +514,10 @@ long compat_sys_msgctl(int first, int second, void __user *uptr) | |||
514 | return err; | 514 | return err; |
515 | } | 515 | } |
516 | 516 | ||
517 | #ifndef COMPAT_SHMLBA | ||
518 | #define COMPAT_SHMLBA SHMLBA | ||
519 | #endif | ||
520 | |||
517 | #ifdef CONFIG_ARCH_WANT_OLD_COMPAT_IPC | 521 | #ifdef CONFIG_ARCH_WANT_OLD_COMPAT_IPC |
518 | long compat_sys_shmat(int first, int second, compat_uptr_t third, int version, | 522 | long compat_sys_shmat(int first, int second, compat_uptr_t third, int version, |
519 | void __user *uptr) | 523 | void __user *uptr) |
@@ -524,7 +528,7 @@ long compat_sys_shmat(int first, int second, compat_uptr_t third, int version, | |||
524 | 528 | ||
525 | if (version == 1) | 529 | if (version == 1) |
526 | return -EINVAL; | 530 | return -EINVAL; |
527 | err = do_shmat(first, uptr, second, &raddr); | 531 | err = do_shmat(first, uptr, second, &raddr, COMPAT_SHMLBA); |
528 | if (err < 0) | 532 | if (err < 0) |
529 | return err; | 533 | return err; |
530 | uaddr = compat_ptr(third); | 534 | uaddr = compat_ptr(third); |
@@ -536,7 +540,7 @@ long compat_sys_shmat(int shmid, compat_uptr_t shmaddr, int shmflg) | |||
536 | unsigned long ret; | 540 | unsigned long ret; |
537 | long err; | 541 | long err; |
538 | 542 | ||
539 | err = do_shmat(shmid, compat_ptr(shmaddr), shmflg, &ret); | 543 | err = do_shmat(shmid, compat_ptr(shmaddr), shmflg, &ret, COMPAT_SHMLBA); |
540 | if (err) | 544 | if (err) |
541 | return err; | 545 | return err; |
542 | force_successful_syscall_return(); | 546 | force_successful_syscall_return(); |