mm: fix null pointer dereference in wait_iff_congested()
[~shefty/rdma-dev.git] / mm / vmscan.c
index 23291b9ae87139c27f60de1e820e3d9e8e66f4b3..16b42af393ac09b6450ab6dcbfd169114f19f792 100644 (file)
@@ -2775,7 +2775,7 @@ loop_again:
                if (total_scanned && (sc.priority < DEF_PRIORITY - 2)) {
                        if (has_under_min_watermark_zone)
                                count_vm_event(KSWAPD_SKIP_CONGESTION_WAIT);
-                       else
+                       else if (unbalanced_zone)
                                wait_iff_congested(unbalanced_zone, BLK_RW_ASYNC, HZ/10);
                }