svn commit: r351624 - head/sys/dev/sound/midi
Mark Johnston
markj at FreeBSD.org
Fri Aug 30 15:40:31 UTC 2019
Author: markj
Date: Fri Aug 30 15:40:31 2019
New Revision: 351624
URL: https://svnweb.freebsd.org/changeset/base/351624
Log:
Properly check for an interrupted cv_wait_sig().
The returned error number may be EINTR or ERESTART depending on
whether or not the signal is supposed to interrupt the system call.
Reported and tested by: pho
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/dev/sound/midi/sequencer.c
Modified: head/sys/dev/sound/midi/sequencer.c
==============================================================================
--- head/sys/dev/sound/midi/sequencer.c Fri Aug 30 06:06:12 2019 (r351623)
+++ head/sys/dev/sound/midi/sequencer.c Fri Aug 30 15:40:31 2019 (r351624)
@@ -912,7 +912,7 @@ mseq_read(struct cdev *i_dev, struct uio *uio, int iof
goto err1;
retval = cv_wait_sig(&scp->in_cv, &scp->seq_lock);
- if (retval == EINTR)
+ if (retval != 0)
goto err1;
}
@@ -977,7 +977,7 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io
* We slept, maybe things have changed since last
* dying check
*/
- if (retval == EINTR)
+ if (retval != 0)
goto err0;
#if 0
/*
More information about the svn-src-all
mailing list