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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 31 Jul 2014 10:27:50 +1000
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	John Stultz <john.stultz@...aro.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	"H. Peter Anvin" <hpa@...or.com>,
	Peter Zijlstra <peterz@...radead.org>,
	David Miller <davem@...emloft.net>,
	"John W. Linville" <linville@...driver.com>,
	Felix Fietkau <nbd@...nwrt.org>,
	Rajkumar Manoharan <rmanohar@....qualcomm.com>,
	<netdev@...r.kernel.org>,
	QCA ath9k Development <ath9k-devel@....qualcomm.com>,
	linux-next@...r.kernel.org
Subject: Re: [RFC][PATCH] wireless: ath9k: Convert from timespecs to ktime_t

Hi John,

One obvious thing ...

On Wed, 30 Jul 2014 17:01:05 -0700 John Stultz <john.stultz@...aro.org> wrote:
>
> diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
> index fd0158f..d15f48e 100644
> --- a/drivers/net/wireless/ath/ath9k/hw.c
> +++ b/drivers/net/wireless/ath/ath9k/hw.c
> @@ -1731,19 +1731,14 @@ fail:
>  	return -EINVAL;
>  }
>  
> -u32 ath9k_hw_get_tsf_offset(struct timespec *last, struct timespec *cur)
> +u32 ath9k_hw_get_tsf_offset(ktime_t *last, ktime_t *cur)
>  {
> -	struct timespec ts;
>  	s64 usec;
>  
> -	if (!cur) {
> -		getrawmonotonic(&ts);
> -		cur = &ts;
> -	}
> -
> -	usec = cur->tv_sec * 1000000ULL + cur->tv_nsec / 1000;
> -	usec -= last->tv_sec * 1000000ULL + last->tv_nsec / 1000;
> +	if (!cur)
> +		*cur = ktime_get_raw();

You are assigning through a NULL pointer here ...

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ