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: <54F6FFA8.70505@cogentembedded.com>
Date:	Wed, 04 Mar 2015 15:50:48 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	David Vrabel <david.vrabel@...rix.com>, netdev@...r.kernel.org
CC:	xen-devel@...ts.xenproject.org,
	Ian Campbell <ian.campbell@...rix.com>,
	Wei Liu <wei.liu2@...rix.com>
Subject: Re: [PATCHv1 1/2] xen-netback: return correct ethtool stats

Hello.

On 3/3/2015 7:26 PM, David Vrabel wrote:

> Use correct pointer arithmetic to get the pointer to each stat.

> Signed-off-by: David Vrabel <david.vrabel@...rix.com>
> ---
>   drivers/net/xen-netback/interface.c |    3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)

> diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
> index f38227a..3aa8648 100644
> --- a/drivers/net/xen-netback/interface.c
> +++ b/drivers/net/xen-netback/interface.c
> @@ -340,12 +340,11 @@ static void xenvif_get_ethtool_stats(struct net_device *dev,
>   	unsigned int num_queues = vif->num_queues;
>   	int i;
>   	unsigned int queue_index;
> -	struct xenvif_stats *vif_stats;
>
>   	for (i = 0; i < ARRAY_SIZE(xenvif_stats); i++) {
>   		unsigned long accum = 0;
>   		for (queue_index = 0; queue_index < num_queues; ++queue_index) {
> -			vif_stats = &vif->queues[queue_index].stats;
> +			void *vif_stats = &vif->queues[queue_index].stats;

    Need empty line after declaration; checkpatch.pl should have complained here.

>   			accum += *(unsigned long *)(vif_stats + xenvif_stats[i].offset);
>   		}
>   		data[i] = accum;

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ