diff options
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/shm.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/ipc/shm.c b/ipc/shm.c index 3cf48988d68c..930be3aa80cf 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -1363,13 +1363,8 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, if (addr) { if (addr & (shmlba - 1)) { - /* - * Round down to the nearest multiple of shmlba. - * For sane do_mmap_pgoff() parameters, avoid - * round downs that trigger nil-page and MAP_FIXED. - */ - if ((shmflg & SHM_RND) && addr >= shmlba) - addr &= ~(shmlba - 1); + if (shmflg & SHM_RND) + addr &= ~(shmlba - 1); /* round down */ else #ifndef __ARCH_FORCE_SHMLBA if (addr & ~PAGE_MASK) |