mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-02 20:29:20 +00:00
genirq: keep affinities set from userspace across free/request_irq()
Impact: preserve user-modified affinities on interrupts
Kumar Galak noticed that commit
1840475676
(genirq: Expose default irq
affinity mask (take 3))
overrides an already set affinity setting across a free /
request_irq(). Happens e.g. with ifdown/ifup of a network device.
Change the logic to mark the affinities as set and keep them
intact. This also fixes the unlocked access to irq_desc in
irq_select_affinity() when called from irq_affinity_proc_write()
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
8b805ef617
commit
f6d87f4bd2
5 changed files with 53 additions and 28 deletions
|
@ -62,7 +62,7 @@ static ssize_t irq_affinity_proc_write(struct file *file,
|
|||
if (!cpus_intersects(new_value, cpu_online_map))
|
||||
/* Special case for empty set - allow the architecture
|
||||
code to set default SMP affinity. */
|
||||
return irq_select_affinity(irq) ? -EINVAL : count;
|
||||
return irq_select_affinity_usr(irq) ? -EINVAL : count;
|
||||
|
||||
irq_set_affinity(irq, new_value);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue