aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xarray.c
diff options
context:
space:
mode:
authorMaxim Mikityanskiy <[email protected]>2021-02-05 22:51:39 +0000
committerMauro Carvalho Chehab <[email protected]>2021-03-11 10:40:28 +0000
commit8a7e27fd5cd696ba564a3f62cedef7269cfd0723 (patch)
tree342ad489b0a35d0957410ccad3ccbe49923a12d2 /lib/xarray.c
parentmedia: rc: compile rc-cec.c into rc-core (diff)
downloadkernel-8a7e27fd5cd696ba564a3f62cedef7269cfd0723.tar.gz
kernel-8a7e27fd5cd696ba564a3f62cedef7269cfd0723.zip
media: usbtv: Fix deadlock on suspend
usbtv doesn't support power management, so on system suspend the .disconnect callback of the driver is called. The teardown sequence includes a call to snd_card_free. Its implementation waits until the refcount of the sound card device drops to zero, however, if its file is open, snd_card_file_add takes a reference, which can't be dropped during the suspend, because the userspace processes are already frozen at this point. snd_card_free waits for completion forever, leading to a hang on suspend. This commit fixes this deadlock condition by replacing snd_card_free with snd_card_free_when_closed, that doesn't wait until all references are released, allowing suspend to progress. Fixes: 63ddf68de52e ("[media] usbtv: add audio support") Signed-off-by: Maxim Mikityanskiy <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'lib/xarray.c')
0 files changed, 0 insertions, 0 deletions