Re: [PATCH] ALSA: aloop: Fix &cable->lock deadlock issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 25 Jun 2023 18:22:56 +0200,
YE Chengfeng wrote:
> 
> The timer loopback_jiffies_timer_function is executed under
> bottom-half softirq context and require a spinlock, thus
> other process context code requiring the same lock (i.e.,
> loopback_trigger, loopback_pointer) can deadlock with the
> timer if it is preempted while holding the lock.
> 
> Deadlock scenario:
> loopback_trigger
>     -> spin_lock(&cable->lock);
>         <timer interrupt>
>         -> loopback_jiffies_timer_function
>         -> spin_lock_irqsave(&dpcm->cable->lock, flags);
> 
> Fix the potential deadlock by using spin_lock_irqsave.

Similarly like the patch for snd-dummy, this change looks superfluous,
too.


thanks,

Takashi



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux