lkml.org 
[lkml]   [2022]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next 2/3] genirq/affinity: Define tmp_mask as a local variable in irq_do_set_affinity
Date
When irq_do_set_affinity is called, tmp_mask saved last time
does not make any sense. it is reassigned before each use,
so it should be defined as a local variable.

Fixes: 33de0aa4bae9 (“genirq: Always limit the affinity to online CPUs”)
Signed-off-by: Xu Qiang <xuqiang36@huawei.com>
---
kernel/irq/manage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index c3423f552e0b..ae1c7eebdfa6 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -218,7 +218,7 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,
int ret;

static DEFINE_RAW_SPINLOCK(tmp_mask_lock);
- static struct cpumask tmp_mask;
+ struct cpumask tmp_mask;

if (!chip || !chip->irq_set_affinity)
return -EINVAL;
--
2.17.1
\
 
 \ /
  Last update: 2022-08-27 03:18    [W:0.118 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site