diff options
-rw-r--r-- | ipc/shm.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1288,8 +1288,7 @@ SYSCALL_DEFINE1(shmdt, char __user *, shmaddr) | |||
1288 | #else /* CONFIG_MMU */ | 1288 | #else /* CONFIG_MMU */ |
1289 | /* under NOMMU conditions, the exact address to be destroyed must be | 1289 | /* under NOMMU conditions, the exact address to be destroyed must be |
1290 | * given */ | 1290 | * given */ |
1291 | retval = -EINVAL; | 1291 | if (vma && vma->vm_start == addr && vma->vm_ops == &shm_vm_ops) { |
1292 | if (vma->vm_start == addr && vma->vm_ops == &shm_vm_ops) { | ||
1293 | do_munmap(mm, vma->vm_start, vma->vm_end - vma->vm_start); | 1292 | do_munmap(mm, vma->vm_start, vma->vm_end - vma->vm_start); |
1294 | retval = 0; | 1293 | retval = 0; |
1295 | } | 1294 | } |