Author: mm
Date: Mon Aug  1 14:50:31 2011
New Revision: 224579
URL: http://svn.freebsd.org/changeset/base/224579

Log:
  Fix integer overflow in txg_delay() by initializing
  the variable "timeout" as clock_t.
  
  Filed as Illumos Bug #1313
  
  Reviewed by:  avg
  Approved by:  re (kib)
  MFC after:    3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c   Mon Aug  1 
14:13:08 2011        (r224578)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c   Mon Aug  1 
14:50:31 2011        (r224579)
@@ -488,7 +488,7 @@ void
 txg_delay(dsl_pool_t *dp, uint64_t txg, int ticks)
 {
        tx_state_t *tx = &dp->dp_tx;
-       int timeout = ddi_get_lbolt() + ticks;
+       clock_t timeout = ddi_get_lbolt() + ticks;
 
        /* don't delay if this txg could transition to quiesing immediately */
        if (tx->tx_open_txg > txg ||
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to