+3
−5
Loading
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9QRNR CVE: NA -------------------------------- In get_swap_pages(), we select the swap device based on the priority by default. If two or more devices have the same priority, their positions in the avail_lists will move in a circle in plist_requeue(). After set memory.swapfile in a memory cgroup and the priority of the matched swap is less than the priority of these swap, the loop will be confined to these swaps with same priority and can't select the specified swap forever. Fix the infinite loop by skip the unmatched swap before plist_requeue(). Fixes: 682fc25d ("mm/swapfile: introduce per-memcg swapfile control") Signed-off-by:Liu Shixin <liushixin2@huawei.com>