Commit f0a4b4bf authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

ids: Make sure root ids is present in image

Here is updated one.

0001-ids-Make-sure-kIDs-is-present-in-image.patch

>From dee67b483f0ed1a6f81ebe95ae9bdf74d3ab2ad7 Mon Sep 17 00:00:00 2001
From: Cyrill Gorcunov <gorcunov@openvz.org>
Date: Fri, 15 Mar 2013 00:43:30 +0400
Subject: [PATCH 1/2] ids: Make sure kIDs is present in image

Otherwise yield error instead of nil dereference
if we meet a broken image.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 31ce074b
......@@ -497,6 +497,14 @@ static int prepare_pstree_kobj_ids(void)
else
ids = root_ids;
/*
* Add some sanity check on image data.
*/
if (unlikely(!ids)) {
pr_err("No kIDs provided, image corruption\n");
return -1;
}
cflags = get_clone_mask(item->ids, ids);
if (cflags & CLONE_FILES) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment