From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Smith Subject: Re: [PATCH] c/r: support ipc shm regions which are partially mapped Date: Mon, 09 Aug 2010 11:23:43 -0700 Message-ID: <87lj8fk5lc.fsf@caffeine.danplanet.com> References: <1281129532-4041-1-git-send-email-orenl@cs.columbia.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Oren Laadan Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: containers.vger.kernel.org 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 <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-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org