Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144808684
D54130.1776550571.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
748 B
Referenced Files
None
Subscribers
None
D54130.1776550571.diff
View Options
diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c
--- a/sys/dev/sound/midi/midi.c
+++ b/sys/dev/sound/midi/midi.c
@@ -467,9 +467,11 @@
MIDI_DEBUG(6, printf("midiread: uiomove cc=%d\n", used));
MIDIQ_DEQ(m->inq, buf, used);
+ mtx_unlock(&m->lock);
retval = uiomove(buf, used, uio);
if (retval)
- goto err1;
+ goto err0;
+ mtx_lock(&m->lock);
}
/*
@@ -541,9 +543,11 @@
(intmax_t)MIDIQ_AVAIL(m->outq)));
MIDI_DEBUG(5, printf("midi_write: uiomove cc=%d\n", used));
+ mtx_unlock(&m->lock);
retval = uiomove(buf, used, uio);
if (retval)
- goto err1;
+ goto err0;
+ mtx_lock(&m->lock);
MIDIQ_ENQ(m->outq, buf, used);
/*
* Inform the bottom half that data can be written
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 18, 10:16 PM (9 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28380155
Default Alt Text
D54130.1776550571.diff (748 B)
Attached To
Mode
D54130: sound: Unlock around uiomove() in midi_{read,write}()
Attached
Detach File
Event Timeline
Log In to Comment