diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-08-18 03:27:08 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-08-18 03:27:08 +0200 |
commit | 6c16f42a4e01ef1543fb21e594c2b25d00697649 (patch) | |
tree | a99d0e3f5831a4f2cef3e4266a034561185a1213 /kernel/power | |
parent | 694d0d0bb2030d2e36df73e2d23d5770511dbc8d (diff) | |
parent | 924d8696751c4b9e58263bc82efdafcf875596a6 (diff) | |
download | op-kernel-dev-6c16f42a4e01ef1543fb21e594c2b25d00697649.zip op-kernel-dev-6c16f42a4e01ef1543fb21e594c2b25d00697649.tar.gz |
Merge branch 'pm-sleep'
* pm-sleep:
PM / hibernate: Fix rtree_next_node() to avoid walking off list ends
x86/power/64: Use __pa() for physical address computation
PM / sleep: Update some system sleep documentation
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/snapshot.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 9a0178c..b022284 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c @@ -835,9 +835,9 @@ static bool memory_bm_pfn_present(struct memory_bitmap *bm, unsigned long pfn) */ static bool rtree_next_node(struct memory_bitmap *bm) { - bm->cur.node = list_entry(bm->cur.node->list.next, - struct rtree_node, list); - if (&bm->cur.node->list != &bm->cur.zone->leaves) { + if (!list_is_last(&bm->cur.node->list, &bm->cur.zone->leaves)) { + bm->cur.node = list_entry(bm->cur.node->list.next, + struct rtree_node, list); bm->cur.node_pfn += BM_BITS_PER_BLOCK; bm->cur.node_bit = 0; touch_softlockup_watchdog(); @@ -845,9 +845,9 @@ static bool rtree_next_node(struct memory_bitmap *bm) } /* No more nodes, goto next zone */ - bm->cur.zone = list_entry(bm->cur.zone->list.next, + if (!list_is_last(&bm->cur.zone->list, &bm->zones)) { + bm->cur.zone = list_entry(bm->cur.zone->list.next, struct mem_zone_bm_rtree, list); - if (&bm->cur.zone->list != &bm->zones) { bm->cur.node = list_entry(bm->cur.zone->leaves.next, struct rtree_node, list); bm->cur.node_pfn = 0; |