Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175193239
D54130.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
702 B
Referenced Files
None
Subscribers
None
D54130.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
@@ -391,9 +391,11 @@
used = MIN(used, MIDI_RSIZE);
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);
}
/*
@@ -457,9 +459,11 @@
used = MIN(MIDIQ_AVAIL(m->outq), uio->uio_resid);
used = MIN(used, MIDI_WSIZE);
+ 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, Oct 10, 12:17 AM (8 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40513523
Default Alt Text
D54130.diff (702 B)
Attached To
Mode
D54130: sound: Unlock around uiomove() in midi_{read,write}()
Attached
Detach File
Event Timeline
Log In to Comment