]> git.tue.mpg.de Git - paraslash.git/commitdiff
alsa_write: Avoid hung tasks.
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 7 Jan 2021 23:55:13 +0000 (00:55 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 7 Jan 2021 23:55:13 +0000 (00:55 +0100)
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.

alsa_write.c

index 363e39301651bc47881f850f0235c13f6a016c62..bc06fc315bc51fb3fc1fa9729ae429b47a70d4b4 100644 (file)
@@ -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);