[CRIU] [PATCH 12/11] proc: Fix aio mapping detection

Pavel Emelyanov xemul at parallels.com
Tue Dec 22 01:30:09 PST 2015


This is fixlet to patch #2.

Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
 proc_parse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proc_parse.c b/proc_parse.c
index 84b7526..0e5bc39 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -245,7 +245,7 @@ static int vma_get_mapfile(char *fname, struct vma_area *vma, DIR *mfd,
 				return 0;
 			}
 
-			if ((buf.st_mode & S_IFMT) == 0 && !strcmp(fname, AIO_FNAME)) {
+			if ((buf.st_mode & S_IFMT) == 0 && !strncmp(fname, AIO_FNAME, sizeof(AIO_FNAME) - 1)) {
 				/* AIO ring, let's try */
 				close(vma->vm_file_fd);
 				vma->aio_nr_req = -1;
-- 
1.9.3




More information about the CRIU mailing list