[lvc-project] [PATCH v2] usb: oxu210hp-hcd: Fix double locking of oxu->mem_lock spinlock
Fedor Pchelkin
pchelkin at ispras.ru
Mon Sep 23 22:51:12 MSK 2024
On Sat, 21. Sep 07:49, Mikhail Lobanov wrote:
> Initially, the function oxu_qh_alloc() acquired the spinlock oxu->mem_lock,
> and then called the function ehci_qtd_alloc(), which also attempted
> to acquire the same spinlock. This would lead to a deadlock.
>
> Remove the locking from the function ehci_qtd_alloc(). Now, oxu_qh_alloc()
> can call ehci_qtd_alloc() without causing double locking. In all other
> cases where ehci_qtd_alloc() is called, acquire the spinlock before the
> call, maintaining spinlock locking as in the previous implementation.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: b92a78e582b1 ("usb host: Oxford OXU210HP HCD driver.")
> Signed-off-by: Mikhail Lobanov <m.lobanov at rosalinux.ru>
> ---
> v1->v2: remove bogus mutex mentioning from commit description and update
> the commit message to use spinlock.
> link to v1: https://lore.kernel.org/lkml/20240916174326.118495-1-m.lobanov@rosalinux.ru/
Патч добавлен в LVC-ветки. Спасибо!
More information about the lvc-project
mailing list