netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/i40e: use cpumask_copy() for assigning cpumask
@ 2017-08-12 16:09 Juergen Gross
  2017-08-16  9:52 ` Stefano Brivio
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Gross @ 2017-08-12 16:09 UTC (permalink / raw)
  To: linux-kernel, netdev, intel-wired-lan
  Cc: jeffrey.t.kirsher, Juergen Gross, stable

Using direct assignment for a cpumask is wrong, cpumask_copy() should
be used instead.

Cc: stable@vger.kernel.org
Signed-off-by: Juergen Gross <jgross@suse.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 2db93d3f6d23..c0e42d162c7c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -3495,7 +3495,7 @@ static void i40e_irq_affinity_notify(struct irq_affinity_notify *notify,
 	struct i40e_q_vector *q_vector =
 		container_of(notify, struct i40e_q_vector, affinity_notify);
 
-	q_vector->affinity_mask = *mask;
+	cpumask_copy(&q_vector->affinity_mask, mask);
 }
 
 /**
-- 
2.12.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/i40e: use cpumask_copy() for assigning cpumask
  2017-08-12 16:09 [PATCH] net/i40e: use cpumask_copy() for assigning cpumask Juergen Gross
@ 2017-08-16  9:52 ` Stefano Brivio
  0 siblings, 0 replies; 2+ messages in thread
From: Stefano Brivio @ 2017-08-16  9:52 UTC (permalink / raw)
  To: Juergen Gross
  Cc: linux-kernel, netdev, intel-wired-lan, jeffrey.t.kirsher, stable

Hi Juergen,

On Sat, 12 Aug 2017 18:09:46 +0200
Juergen Gross <jgross@suse.com> wrote:

> Using direct assignment for a cpumask is wrong, cpumask_copy() should
> be used instead.

Perhaps a Fixes: tag might be helpful here, such as:

	Fixes: 96db776a3682 ("i40e/i40evf: fix interrupt affinity bug")

as I reported in my other (late) patch:

	http://marc.info/?l=linux-netdev&m=150279303222066&w=2

> Cc: stable@vger.kernel.org

and maybe also an indication about which versions this applies to, such as

Cc: stable@vger.kernel.org # 4.10+

In general, feel free to copy from my commit message.

These comments also apply to:

	[PATCH] net/i40evf: use cpumask_copy() for assigning cpumask

Thanks,


--
Stefano

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-16  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-12 16:09 [PATCH] net/i40e: use cpumask_copy() for assigning cpumask Juergen Gross
2017-08-16  9:52 ` Stefano Brivio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).