svn commit: r216463 - head/sys/kern

Matthew D Fleming mdf at FreeBSD.org
Wed Dec 15 19:30:45 UTC 2010


Author: mdf
Date: Wed Dec 15 19:30:44 2010
New Revision: 216463
URL: http://svn.freebsd.org/changeset/base/216463

Log:
  One of the compat32 functions was copying in a raw timespec, instead of
  a 32-bit one.  This can cause weird timeout issues, as the copying reads
  garbage from the user.
  
  Code by:     Deepak Veliath <deepak dot veliath at isilon dot com>
  MFC after:   1 week

Modified:
  head/sys/kern/kern_umtx.c

Modified: head/sys/kern/kern_umtx.c
==============================================================================
--- head/sys/kern/kern_umtx.c	Wed Dec 15 16:49:47 2010	(r216462)
+++ head/sys/kern/kern_umtx.c	Wed Dec 15 19:30:44 2010	(r216463)
@@ -3411,8 +3411,7 @@ __umtx_op_rw_rdlock_compat32(struct thre
 	if (uap->uaddr2 == NULL) {
 		error = do_rw_rdlock(td, uap->obj, uap->val, 0);
 	} else {
-		error = copyin(uap->uaddr2, &timeout,
-		    sizeof(timeout));
+		error = copyin_timeout32(uap->uaddr2, &timeout);
 		if (error != 0)
 			return (error);
 		if (timeout.tv_nsec >= 1000000000 ||


More information about the svn-src-head mailing list