[Bugs] [Bug 1302199] Scrubber crash (list corruption)

bugzilla at redhat.com bugzilla at redhat.com
Wed Jan 27 06:56:09 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1302199



--- Comment #1 from Venky Shankar <vshankar at redhat.com> ---
_br_scrubber_find_scrubbable_entry() does a pthread_cond_wait(...) to get
signalled when ->scrublist is non-empty:

    if (list_empty (&fsscrub->scrublist))
        pthread_cond_wait (&fsscrub->cond, &fsscrub->mutex);

pthread_cond_wait() is prone to spurious wakeups as mentioned in man(3)
pthread_cond_wait and callers are expected to validate the condition again. In
the above case, if pthread_cond_wait() returns prematurely, then accessing
first element of ->scrublist and calling list_entry() would give garbage.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are the Docs Contact for the bug.


More information about the Bugs mailing list