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@xxxxxxxxx> >> Signed-off-by: Faisal Latif <faisal.latif@xxxxxxxxx> >> --- >> 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@xxxxxxxxxx> GPG Key ID: 0E572FDD
Attachment:
signature.asc
Description: OpenPGP digital signature