Skip to content
  • Umer Saleem's avatar
    b47d7e12
    Fix a race condition in journal_write · b47d7e12
    Umer Saleem authored
    
    
    There is a race condition in journal_write() where journal_lock is
    being acquired after checking whether journal_fh is NULL or not.
    journal_fh is a static file handle that can be set to NULL by any
    other thread, while current thread is blocked by
    pthread_mutex_lock(). This commit fixes this race condition.
    
    Signed-off-by: default avatarUmer Saleem <usaleem@ixsystems.com>
    b47d7e12
    Fix a race condition in journal_write
    Umer Saleem authored
    
    
    There is a race condition in journal_write() where journal_lock is
    being acquired after checking whether journal_fh is NULL or not.
    journal_fh is a static file handle that can be set to NULL by any
    other thread, while current thread is blocked by
    pthread_mutex_lock(). This commit fixes this race condition.
    
    Signed-off-by: default avatarUmer Saleem <usaleem@ixsystems.com>
Loading