|
@@ -1288,8 +1288,7 @@ SYSCALL_DEFINE1(shmdt, char __user *, shmaddr)
|
|
#else /* CONFIG_MMU */
|
|
#else /* CONFIG_MMU */
|
|
/* under NOMMU conditions, the exact address to be destroyed must be
|
|
/* under NOMMU conditions, the exact address to be destroyed must be
|
|
* given */
|
|
* given */
|
|
- retval = -EINVAL;
|
|
|
|
- if (vma->vm_start == addr && vma->vm_ops == &shm_vm_ops) {
|
|
|
|
|
|
+ if (vma && vma->vm_start == addr && vma->vm_ops == &shm_vm_ops) {
|
|
do_munmap(mm, vma->vm_start, vma->vm_end - vma->vm_start);
|
|
do_munmap(mm, vma->vm_start, vma->vm_end - vma->vm_start);
|
|
retval = 0;
|
|
retval = 0;
|
|
}
|
|
}
|