Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Dec 2010 19:30:45 +0000 (UTC)
From:      Matthew D Fleming <mdf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r216463 - head/sys/kern
Message-ID:  <201012151930.oBFJUjw2080670@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 ||



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012151930.oBFJUjw2080670>