From: Andre Noll Date: Thu, 7 Jan 2021 23:55:13 +0000 (+0100) Subject: alsa_write: Avoid hung tasks. X-Git-Tag: v0.6.3~1 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=fd1f28d32ca04a2ecbe272d68f89c38cbafdaad9;p=paraslash.git alsa_write: Avoid hung tasks. Without this fix the alsa writer may never shutdown, occupying a slot of audiod. The hang was observed with in conjunction to the udp receiver and the prebuffer filter. See also the recent commit 23913cbbfc98. --- diff --git a/alsa_write.c b/alsa_write.c index 363e3930..bc06fc31 100644 --- a/alsa_write.c +++ b/alsa_write.c @@ -266,6 +266,8 @@ static int alsa_write_post_select(__a_unused struct sched *s, void *context) goto err; again: ret = btr_node_status(btrn, wn->min_iqs, BTR_NT_LEAF); + if (ret < 0) + goto err; if (ret == 0) return 0; btr_merge(btrn, wn->min_iqs);