[CRIU] [PATCH v6 01/13] files: BUG on reopening already opened fle

Kirill Tkhai ktkhai at virtuozzo.com
Wed Jan 18 03:57:36 PST 2017


This point we think it's a first call of open(),
so the state must be FLE_INITIALIZED.

v6: New

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/files.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/criu/files.c b/criu/files.c
index 23a70deee..51ee11256 100644
--- a/criu/files.c
+++ b/criu/files.c
@@ -1062,6 +1062,7 @@ static int open_fd(int pid, struct fdinfo_list_entry *fle)
 		return -1;
 	}
 
+	BUG_ON(fle->stage != FLE_INITIALIZED);
 	fle->stage = FLE_OPEN;
 
 	return serve_out_fd(pid, fle->fe->fd, d);



More information about the CRIU mailing list