dump: Fix stack data written to image

I case if there is no file id provided we
might be writting stack data to image. Better
put zeros there.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
Cyrill Gorcunov 2012-01-12 14:09:54 +04:00
parent 307260df2b
commit 76ef79a081

View file

@ -122,6 +122,8 @@ static int dump_one_reg_file(int type, unsigned long fd_name, int lfd,
e.addr = fd_name;
if (id)
memcpy(e.id, id, FD_ID_SIZE);
else
memzero(e.id, FD_ID_SIZE);
pr_info("fdinfo: type: %2x len: %2x flags: %4x pos: %8x addr: %16lx\n",
type, len, flags, pos, fd_name);