lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090315123715.70490281@mjolnir.ossman.eu>
Date:	Sun, 15 Mar 2009 12:37:15 +0100
From:	Pierre Ossman <drzeus@...eus.cx>
To:	Wolfgang Mües <wolfgang.mues@...rswald.de>
Cc:	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Matt Fleming" <matt@...sole-pimps.org>,
	"David Brownell" <dbrownell@...rs.sourceforge.net>,
	"Mike Frysinger" <vapier.adi@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/7] mmc_spi: convert timeout handling to jiffies and
 avoid busy waiting

On Wed, 11 Mar 2009 14:35:03 +0100
Wolfgang Mües <wolfgang.mues@...rswald.de> wrote:

> @@ -816,8 +819,11 @@ mmc_spi_data_do(struct mmc_spi_host *hos
>  	else
>  		clock_rate = spi->max_speed_hz;
>  
> -	timeout = ktime_add_ns(ktime_set(0, 0), data->timeout_ns +
> -			data->timeout_clks * 1000000 / clock_rate);
> +	timeout = data->timeout_ns +
> +		  data->timeout_clks * 1000000 / clock_rate;
> +	timeout = usecs_to_jiffies((unsigned int)(timeout / 1000));
> +	if (!timeout)
> +		timeout = 1;
>  

Does this round properly upwards? Having a timeout 6 ms shorter than it
should be can be a real problem (although the huge timeout your other
patch introduces means we probably won't be affected by it).

Rgds
-- 
     -- Pierre Ossman

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.

Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ