If ipcshm_restore fails to look up the file object for the region being restored, it should return the error to its caller and not proceed to dereference the file pointer. Signed-off-by: Nathan Lynch <ntl@xxxxxxxxx> --- ipc/shm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ipc/shm.c b/ipc/shm.c index eed4b9a..1ba9193 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -334,7 +334,7 @@ int ipcshm_restore(struct ckpt_ctx *ctx, struct mm_struct *mm, file = ckpt_obj_fetch(ctx, h->ino_objref, CKPT_OBJ_FILE); if (IS_ERR(file)) - PTR_ERR(file); + return PTR_ERR(file); shmid = file->f_dentry->d_inode->i_ino; -- 1.7.2.2 _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers