NetBSD-Bugs archive

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

Re: kern/49536



The following reply was made to PR kern/49536; it has been noted by GNATS.

From: Onno van der Linden <o.vd.linden%quicknet.nl@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/49536
Date: Tue, 6 Jan 2015 23:00:22 +0100

 My previous fix for uvm_mmap_dev() needs an
 additional fix: the offset parameter in the call
 to uvm_mmap(). With the complete fix below I'm
 not getting the "Can't find map" drm_debug output.
 There's still a "segmentation violation
 at address 0xa8xxxxxx" somewhere (at exit ?)
 which doesn't crash X. Not sure yet where that
 one comes from.
 
 
 --- uvm_mmap.c.orig	2015-01-03 15:27:57.000000000 +0100
 +++ uvm_mmap.c	2015-01-06 22:42:51.000000000 +0100
 @@ -1084,13 +1084,13 @@
  		*addrp = (void *)p->p_emul->e_vm_default_addr(p,
  		    (vaddr_t)p->p_vmspace->vm_daddr, len);
  
 -	uobj = udv_attach(dev, prot, 0, len);
 +	uobj = udv_attach(dev, prot, off, len);
  	if (uobj == NULL)
  		return EINVAL;
  
  	error = uvm_mmap(&p->p_vmspace->vm_map, (vaddr_t *)addrp,
  			 (vsize_t)len, prot, prot, flags, UVM_ADV_RANDOM,
 -			 uobj, 0, p->p_rlimit[RLIMIT_MEMLOCK].rlim_cur);
 +			 uobj, off, p->p_rlimit[RLIMIT_MEMLOCK].rlim_cur);
  	return error;
  }
  
 
 Onno
 


Home | Main Index | Thread Index | Old Index