855c34e Ticket 48960 Crash in import_wait_for_space_in_fifo().

Authored and Committed by tbordaz 7 years ago
    Ticket 48960 Crash in import_wait_for_space_in_fifo().
    
    Bug Description:
        At online total import on a consumer, the total import startup
        function allocates a fifo queue and monitor the overall import.
        This queue contain the entries later received during import.
    
        When monitoring ends (import complete or error) it frees
        the queue.
    
        Under error condition, there is a possibility that monitoring
        ends while entries are still received (bulk_import_queue).
        So there is a risk that the received entries will be added into
        the queue at the same time the monitoring thread frees the queue
    
    Fix Description:
        The thread storing the entries into the queue runs while
        holding the job->wire_lock.
    
        To prevent the monitoring thread to frees the queue under
        bulk_import_queue, make sure to acquire job->wire_lock
        before calling import_free_job
    
    https://fedorahosted.org/389/ticket/48960
    
    Reviewed by: Mark Reynolds (thanks Mark !)
    
    Platforms tested: F23
    
    Flag Day: no
    
    Doc impact: no