• T
    freezer: restructure __refrigerator() · 5ece3eae
    Tejun Heo 提交于
    If another freeze happens before all tasks leave FROZEN state after
    being thawed, the freezer can see the existing FROZEN and consider the
    tasks to be frozen but they can clear FROZEN without checking the new
    freezing().
    
    Oleg suggested restructuring __refrigerator() such that there's single
    condition check section inside freezer_lock and sigpending is cleared
    afterwards, which fixes the problem and simplifies the code.
    Restructure accordingly.
    
    -v2: Frozen loop exited without releasing freezer_lock.  Fixed.
    Signed-off-by: NTejun Heo <tj@kernel.org>
    Reported-by: NOleg Nesterov <oleg@redhat.com>
    Acked-by: NOleg Nesterov <oleg@redhat.com>
    Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
    5ece3eae
freezer.c 5.1 KB