diff --git a/ipc/shm.c b/ipc/shm.c index 02faa54dbf5a2369cbd01ed464bfa3fcea686cad..047b823e6bf0e3b2639bfb81958f658404cc70b8 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -254,8 +254,10 @@ struct mempolicy *shm_get_policy(struct vm_area_struct *vma, unsigned long addr) if (sfd->vm_ops->get_policy) pol = sfd->vm_ops->get_policy(vma, addr); - else + else if (vma->vm_policy) pol = vma->vm_policy; + else + pol = current->mempolicy; return pol; } #endif