Skip to content

Commit 10eabec

Browse files
committed
um: chan_kern: use raw spinlock for irqs_to_free_lock
Since this is called deep in the ARCH=um IRQ infrastructure it must use a raw spinlock. It's not really part of the driver, but rather the core UML IRQ code. Link: https://patch.msgid.link/20250505103358.ae7dc659f8b4.I64ca7aece30e0b4b0b5b35ad89cdd63db197c0ce@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent bb13e79 commit 10eabec

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/um/drivers/chan_kern.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ int enable_chan(struct line *line)
212212
* be permanently disabled. This is discovered in IRQ context, but
213213
* the freeing of the IRQ must be done later.
214214
*/
215-
static DEFINE_SPINLOCK(irqs_to_free_lock);
215+
static DEFINE_RAW_SPINLOCK(irqs_to_free_lock);
216216
static LIST_HEAD(irqs_to_free);
217217

218218
void free_irqs(void)
@@ -222,9 +222,9 @@ void free_irqs(void)
222222
struct list_head *ele;
223223
unsigned long flags;
224224

225-
spin_lock_irqsave(&irqs_to_free_lock, flags);
225+
raw_spin_lock_irqsave(&irqs_to_free_lock, flags);
226226
list_splice_init(&irqs_to_free, &list);
227-
spin_unlock_irqrestore(&irqs_to_free_lock, flags);
227+
raw_spin_unlock_irqrestore(&irqs_to_free_lock, flags);
228228

229229
list_for_each(ele, &list) {
230230
chan = list_entry(ele, struct chan, free_list);
@@ -246,9 +246,9 @@ static void close_one_chan(struct chan *chan, int delay_free_irq)
246246
return;
247247

248248
if (delay_free_irq) {
249-
spin_lock_irqsave(&irqs_to_free_lock, flags);
249+
raw_spin_lock_irqsave(&irqs_to_free_lock, flags);
250250
list_add(&chan->free_list, &irqs_to_free);
251-
spin_unlock_irqrestore(&irqs_to_free_lock, flags);
251+
raw_spin_unlock_irqrestore(&irqs_to_free_lock, flags);
252252
} else {
253253
if (chan->input && chan->enabled)
254254
um_free_irq(chan->line->read_irq, chan);

0 commit comments

Comments
 (0)