Skip to content

Commit

Permalink
GUACAMOLE_377: Read lock should NOT be acquired at same time as write…
Browse files Browse the repository at this point in the history
… lock.

Acquiring the read lock first and then reentrantly acquiring the write
lock may result in other existing readers getting promoted to writers.
  • Loading branch information
mike-jumper committed Sep 21, 2024
1 parent 4df0b71 commit 4202349
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libguac/display-flush.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static int PFW_LFW_guac_display_frame_complete(guac_display* display) {

void guac_display_end_mouse_frame(guac_display* display) {

guac_rwlock_acquire_read_lock(&display->pending_frame.lock);
guac_rwlock_acquire_write_lock(&display->pending_frame.lock);

if (!display->pending_frame_dirty_excluding_mouse)
guac_display_end_multiple_frames(display, 0);
Expand Down

0 comments on commit 4202349

Please sign in to comment.