* [PATCH] i40iw: Use correct src address in memcpy to rdma stats counters
@ 2016-11-11 16:55 Shiraz Saleem
[not found] ` <1478883341-22124-1-git-send-email-shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Shiraz Saleem @ 2016-11-11 16:55 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
cl-vYTEC60ixJUAvxtiuMwx3w, Shiraz Saleem
hw_stats is a pointer to i40_iw_dev_stats struct in i40iw_get_hw_stats().
Use hw_stats and not &hw_stats in the memcpy to copy the i40iw device stats
data into rdma_hw_stats counters.
Fixes: b40f4757daa1 ("IB/core: Make device counter infrastructure dynamic")
Signed-off-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
index b71394b..02c8f9a 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
@@ -2498,7 +2498,7 @@ static int i40iw_get_hw_stats(struct ib_device *ibdev,
return -ENOSYS;
}
- memcpy(&stats->value[0], &hw_stats, sizeof(*hw_stats));
+ memcpy(&stats->value[0], hw_stats, sizeof(*hw_stats));
return stats->num_counters;
}
--
2.8.0
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i40iw: Use correct src address in memcpy to rdma stats counters
[not found] ` <1478883341-22124-1-git-send-email-shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2016-12-06 17:39 ` Shiraz Saleem
[not found] ` <20161206173917.GB15668-GOXS9JX10wfOxmVO0tvppfooFf0ArEBIu+b9c/7xato@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Shiraz Saleem @ 2016-12-06 17:39 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
cl-vYTEC60ixJUAvxtiuMwx3w
Doug - Can you please pick this up for 4.9? It was a bug introduced in 4.7.
On Fri, Nov 11, 2016 at 09:55:41AM -0700, Saleem, Shiraz wrote:
> hw_stats is a pointer to i40_iw_dev_stats struct in i40iw_get_hw_stats().
> Use hw_stats and not &hw_stats in the memcpy to copy the i40iw device stats
> data into rdma_hw_stats counters.
>
> Fixes: b40f4757daa1 ("IB/core: Make device counter infrastructure dynamic")
>
> Signed-off-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
> drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
> index b71394b..02c8f9a 100644
> --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
> +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
> @@ -2498,7 +2498,7 @@ static int i40iw_get_hw_stats(struct ib_device *ibdev,
> return -ENOSYS;
> }
>
> - memcpy(&stats->value[0], &hw_stats, sizeof(*hw_stats));
> + memcpy(&stats->value[0], hw_stats, sizeof(*hw_stats));
>
> return stats->num_counters;
> }
> --
> 2.8.0
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i40iw: Use correct src address in memcpy to rdma stats counters
[not found] ` <20161206173917.GB15668-GOXS9JX10wfOxmVO0tvppfooFf0ArEBIu+b9c/7xato@public.gmane.org>
@ 2016-12-12 22:20 ` Doug Ledford
0 siblings, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2016-12-12 22:20 UTC (permalink / raw)
To: Shiraz Saleem
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
cl-vYTEC60ixJUAvxtiuMwx3w
[-- Attachment #1.1: Type: text/plain, Size: 1487 bytes --]
On 12/6/2016 12:39 PM, Shiraz Saleem wrote:
> Doug - Can you please pick this up for 4.9? It was a bug introduced in 4.7.
>
>
> On Fri, Nov 11, 2016 at 09:55:41AM -0700, Saleem, Shiraz wrote:
>> hw_stats is a pointer to i40_iw_dev_stats struct in i40iw_get_hw_stats().
>> Use hw_stats and not &hw_stats in the memcpy to copy the i40iw device stats
>> data into rdma_hw_stats counters.
>>
>> Fixes: b40f4757daa1 ("IB/core: Make device counter infrastructure dynamic")
>>
>> Signed-off-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>> Signed-off-by: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>> ---
>> drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
>> index b71394b..02c8f9a 100644
>> --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
>> +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
>> @@ -2498,7 +2498,7 @@ static int i40iw_get_hw_stats(struct ib_device *ibdev,
>> return -ENOSYS;
>> }
>>
>> - memcpy(&stats->value[0], &hw_stats, sizeof(*hw_stats));
>> + memcpy(&stats->value[0], hw_stats, sizeof(*hw_stats));
>>
>> return stats->num_counters;
>> }
>> --
>> 2.8.0
>>
Picked up for the current kernel and stable tag added.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG Key ID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-12 22:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-11 16:55 [PATCH] i40iw: Use correct src address in memcpy to rdma stats counters Shiraz Saleem
[not found] ` <1478883341-22124-1-git-send-email-shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-12-06 17:39 ` Shiraz Saleem
[not found] ` <20161206173917.GB15668-GOXS9JX10wfOxmVO0tvppfooFf0ArEBIu+b9c/7xato@public.gmane.org>
2016-12-12 22:20 ` Doug Ledford
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.