mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 14:55:39 +00:00
kerndat: Sanitize pagemap entry read err check
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
@@ -85,9 +85,8 @@ int kerndat_get_dirty_track(void)
|
|||||||
|
|
||||||
lseek(pm2, (unsigned long)map / PAGE_SIZE * sizeof(u64), SEEK_SET);
|
lseek(pm2, (unsigned long)map / PAGE_SIZE * sizeof(u64), SEEK_SET);
|
||||||
ret = read(pm2, &pmap, sizeof(pmap));
|
ret = read(pm2, &pmap, sizeof(pmap));
|
||||||
if (ret < 0){
|
if (ret < 0)
|
||||||
pr_perror("Read pmap err!");
|
pr_perror("Read pmap err!");
|
||||||
}
|
|
||||||
|
|
||||||
close(pm2);
|
close(pm2);
|
||||||
munmap(map, PAGE_SIZE);
|
munmap(map, PAGE_SIZE);
|
||||||
|
Reference in New Issue
Block a user