[CRIU] [PATCH] dump: don't play with a function exit code

Pavel Emelyanov xemul at parallels.com
Fri Oct 17 06:23:14 PDT 2014


On 10/14/2014 08:24 PM, Andrey Vagin wrote:
> We should not have a chance to exit with a wrong code on error paths.
> 
> Now dump_one_task() returs zero, if allocation of dfds failed:
> 
> ret = collect_mappings(pid, &vmas);
> if (ret) {
> 	pr_err("Collect mappings (pid: %d) failed with %d\n", pid, ret);
> 	goto err;
> }
> 
> if (!shared_fdtable(item)) {
> 	dfds = xmalloc(sizeof(*dfds));
> 	if (!dfds)
> 		goto err;
> 
> ...
> err:
> 	return -1;
> 
> Signed-off-by: Andrey Vagin <avagin at openvz.org>

Applied, thanks.



More information about the CRIU mailing list