Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c08f1d1 authored by Mike Frysinger's avatar Mike Frysinger Committed by Bryan Wu
Browse files

Blackfin arch: have is_user_addr_valid() check for overflows (like when address is -1)

parent d207a8c7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -160,6 +160,10 @@ static inline int is_user_addr_valid(struct task_struct *child,
	struct vm_list_struct *vml;
	struct sram_list_struct *sraml;

	/* overflow */
	if (start + len < start)
		return -EIO;

	for (vml = child->mm->context.vmlist; vml; vml = vml->next)
		if (start >= vml->vma->vm_start && start + len < vml->vma->vm_end)
			return 0;