1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

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
This commit is contained in:
Martin Matuska 2011-08-01 14:50:31 +00:00
parent 217e3abc03
commit ad4887a72a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=224579

View File

@ -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 ||