Unlock channels when any of them are locked, when returning for non-busy state.

Reported and tested by:	"Wall, Stephen" <stephen.wall@redcom.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2020-11-20 14:02:43 +00:00
parent 47384244f9
commit 77602e977e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=367892

View File

@ -857,6 +857,8 @@ dsp_io_ops(struct cdev *i_dev, struct uio *buf)
getchns(i_dev, &rdch, &wrch, prio);
if (*ch == NULL || !((*ch)->flags & CHN_F_BUSY)) {
if (rdch != NULL || wrch != NULL)
relchns(i_dev, rdch, wrch, prio);
PCM_GIANT_EXIT(d);
return (EBADF);
}