diff options
Diffstat (limited to 'mm')
| -rw-r--r-- | mm/Kconfig | 8 | ||||
| -rw-r--r-- | mm/fremap.c | 5 | ||||
| -rw-r--r-- | mm/memory_hotplug.c | 2 | ||||
| -rw-r--r-- | mm/process_vm_access.c | 8 | 
4 files changed, 10 insertions, 13 deletions
diff --git a/mm/Kconfig b/mm/Kconfig index ae55c1e04d1..3bea74f1ccf 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -286,8 +286,12 @@ config NR_QUICK  	default "1"  config VIRT_TO_BUS -	def_bool y -	depends on HAVE_VIRT_TO_BUS +	bool +	help +	  An architecture should select this if it implements the +	  deprecated interface virt_to_bus().  All new architectures +	  should probably not select this. +  config MMU_NOTIFIER  	bool diff --git a/mm/fremap.c b/mm/fremap.c index 0cd4c11488e..4723ac8d2fc 100644 --- a/mm/fremap.c +++ b/mm/fremap.c @@ -129,7 +129,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,  	struct vm_area_struct *vma;  	int err = -EINVAL;  	int has_write_lock = 0; -	vm_flags_t vm_flags; +	vm_flags_t vm_flags = 0;  	if (prot)  		return err; @@ -254,7 +254,8 @@ get_write_lock:  	 */  out: -	vm_flags = vma->vm_flags; +	if (vma) +		vm_flags = vma->vm_flags;  	if (likely(!has_write_lock))  		up_read(&mm->mmap_sem);  	else diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index b81a367b9f3..9597eec8239 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1801,7 +1801,7 @@ int __ref remove_memory(int nid, u64 start, u64 size)  	int retry = 1;  	start_pfn = PFN_DOWN(start); -	end_pfn = start_pfn + PFN_DOWN(size); +	end_pfn = PFN_UP(start + size - 1);  	/*  	 * When CONFIG_MEMCG is on, one memory block may be used by other diff --git a/mm/process_vm_access.c b/mm/process_vm_access.c index 926b4664974..fd26d043350 100644 --- a/mm/process_vm_access.c +++ b/mm/process_vm_access.c @@ -429,12 +429,6 @@ compat_process_vm_rw(compat_pid_t pid,  	if (flags != 0)  		return -EINVAL; -	if (!access_ok(VERIFY_READ, lvec, liovcnt * sizeof(*lvec))) -		goto out; - -	if (!access_ok(VERIFY_READ, rvec, riovcnt * sizeof(*rvec))) -		goto out; -  	if (vm_write)  		rc = compat_rw_copy_check_uvector(WRITE, lvec, liovcnt,  						  UIO_FASTIOV, iovstack_l, @@ -459,8 +453,6 @@ free_iovecs:  		kfree(iov_r);  	if (iov_l != iovstack_l)  		kfree(iov_l); - -out:  	return rc;  }  |