Messages in this thread Patch in this message | | | From | Xu Qiang <> | Subject | [PATCH -next 2/3] genirq/affinity: Define tmp_mask as a local variable in irq_do_set_affinity | Date | Sat, 27 Aug 2022 01:13:50 +0000 |
| |
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
| |