Re: [PATCH 3/3] intr: Protect internals with a lock

2024-12-10 Thread Samuel Thibault
Sergey Bugaev, le mar. 10 déc. 2024 15:24:02 +0300, a ecrit: > On Tue, Dec 10, 2024 at 3:19 PM Samuel Thibault > wrote: > > Sergey Bugaev, le mar. 10 déc. 2024 14:57:05 +0300, a ecrit: > > > @@ -103,11 +105,15 @@ queue_intr (struct irqdev *dev, int id, user_intr_t > > > *e) > > > * disabled.

Re: [PATCH 3/3] intr: Protect internals with a lock

2024-12-10 Thread Sergey Bugaev
On Tue, Dec 10, 2024 at 3:19 PM Samuel Thibault wrote: > Sergey Bugaev, le mar. 10 déc. 2024 14:57:05 +0300, a ecrit: > > @@ -103,11 +105,15 @@ queue_intr (struct irqdev *dev, int id, user_intr_t > > *e) > > * disabled. Level-triggered interrupts would keep raising otherwise. */ > >__disa

Re: [PATCH 3/3] intr: Protect internals with a lock

2024-12-10 Thread Samuel Thibault
Hello, Sergey Bugaev, le mar. 10 déc. 2024 14:57:05 +0300, a ecrit: > @@ -103,11 +105,15 @@ queue_intr (struct irqdev *dev, int id, user_intr_t *e) > * disabled. Level-triggered interrupts would keep raising otherwise. */ >__disable_irq (dev->irq[id]); > > - spl_t s = splhigh (); > +#if

[PATCH 3/3] intr: Protect internals with a lock

2024-12-10 Thread Sergey Bugaev
On SMP builds with 2 CPU cores, we've seen whole-system lock-ups caused by irqdev.tot_num_intr getting set to -1, even though it's supposed to always stay non-negative. Indeed, it was modified without the appropriate synchronization. Fix this by protecting it, as well as various other internals of