Re: [PATCH] c/r: support ipc shm regions which are partially mapped

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This *almost* fixes it for me.

OL> +	ret = do_shmat_pgoff(shmid, (char __user *) start, shmflg,
OL> +			     &addr, h->vm_end - h->vm_start, h->vm_pgoff);

As discussed on IRC, h->vm_pgoff needs to be <<PAGE_SHIFT'ed here.

Also, since do_shmat_pgoff() checks the inode size and compares it to
the vma size, (h->vm_end - h->vm_start) may not always be correct.  We
should pass the smaller of the inode and vma sizes here.

Other than that, it looks good and works well for me :)

Thanks!

-- 
Dan Smith
IBM Linux Technology Center
email: danms@xxxxxxxxxx
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux