diff --git a/ap/os/linux/linux-3.4.x/mm/mmap.c b/ap/os/linux/linux-3.4.x/mm/mmap.c
index 88d133b..702f65d 100755
--- a/ap/os/linux/linux-3.4.x/mm/mmap.c
+++ b/ap/os/linux/linux-3.4.x/mm/mmap.c
@@ -41,9 +41,11 @@
 
 #ifdef CONFIG_SYSVIPC_CROSS_SHM
 #include <../ipc/shm_ctrl.h>
-extern void shm_mmap_pagetable(struct vm_area_struct *vma, struct file *file);
-extern void shm_unmap_page_range(struct mm_struct *mm, struct vm_area_struct *vma,
-			                      unsigned long addr, unsigned long end);
+extern key_t shm_do_remote_analy_key(struct file *file);
+extern int   shm_ipc_mmap_pagetable(struct vm_area_struct *vma, struct file *file);
+static void  shm_delete_vma_from_mm(struct vm_area_struct *vma);
+static void  shm_delete_vma(struct mm_struct *mm, struct vm_area_struct *vma);
+
 #define kenter(FMT, ...) \
 	no_printk(KERN_DEBUG "==> %s("FMT")\n", __func__, ##__VA_ARGS__)
 #define kleave(FMT, ...) \
@@ -1435,11 +1437,18 @@
 		make_pages_present(addr, addr + len);
 	
 #ifdef CONFIG_SYSVIPC_CROSS_SHM 
-	/*Get real phy pgae*/
-	if (file && (file->f_flags == SHM_REMOTE_ATTR_YES))
-	{		
-		shm_mmap_pagetable(vma, file);		
-	}
+	if (file && ((file->shm_flags == SHM_REMOTE_SYSV_YES)
+		      || (file->shm_flags == SHM_REMOTE_POSIX_YES))) {
+		/*Get real phy pgae*/
+		error = shm_ipc_mmap_pagetable(vma, file);	
+		if (error < 0)
+		{
+			shm_delete_vma_from_mm(vma);
+			shm_delete_vma(mm, vma);
+			return error;
+		}
+	}	
+
 #endif
 	return addr;
 
@@ -2147,6 +2156,18 @@
 }
 
 #ifdef CONFIG_SYSVIPC_CROSS_SHM
+int shm_try_to_free_pages(struct file *file)
+{
+	int ret = 0;
+	key_t shm_key;
+
+	shm_key = shm_do_remote_analy_key(file);
+	ret     = shm_remote_free_pages(shm_key);
+	if (ret < 0)
+		printk("shm_try_to_free_pages Error\n");
+	return ret;
+}
+
 /*
  * delete a VMA from its owning mm_struct and address space
  */
@@ -2270,7 +2291,8 @@
 	}
 
 erase_whole_vma:
-	shm_unmap_page_range(mm, vma, start, end);
+	shm_unmap_page_range(mm, vma, start, end);	
+	shm_try_to_free_pages(vma->vm_file);
 	shm_delete_vma_from_mm(vma);
 	shm_delete_vma(mm, vma);
 	return 0;
@@ -2340,7 +2362,9 @@
 	vma = prev? prev->vm_next: mm->mmap;
 		
 #ifdef CONFIG_SYSVIPC_CROSS_SHM
-	if (vma->vm_file && (vma->vm_file->f_flags == SHM_REMOTE_ATTR_YES)) {
+	if (vma->vm_file && 
+		((vma->vm_file->shm_flags == SHM_REMOTE_SYSV_YES)
+		|| (vma->vm_file->shm_flags == SHM_REMOTE_POSIX_YES))) {
 		shm_ctrl_do_munmap(mm, start, len);
 		return 0;
 	}
@@ -2527,7 +2551,8 @@
 	vma_shm = mm->mmap;
 	while (vma_shm) {		
 		if ((vma_shm->vm_file) && 
-		   (vma_shm->vm_file->f_flags == SHM_REMOTE_ATTR_YES)) {
+		   ((vma_shm->vm_file->shm_flags == SHM_REMOTE_SYSV_YES)
+		    ||(vma_shm->vm_file->shm_flags == SHM_REMOTE_POSIX_YES))) {
 			vma = vma_shm->vm_next;
 			shm_ctrl_do_munmap(mm, vma_shm->vm_start, (vma_shm->vm_end - vma_shm->vm_start));
 			vma_shm = vma;
