[CRIU] [PATCH] Add pre-dump and pre-restore action scripts
Matthew Krafczyk
krafczyk.matthew at gmail.com
Wed Oct 7 07:17:50 PDT 2015
Okay, if that's the only comment, then I'll correct that and resubmit
the patch.
On Wed, Oct 07, 2015 at 03:28:36PM +0300, Pavel Emelyanov wrote:
>
> > @@ -1736,6 +1736,14 @@ static int restore_root_task(struct pstree_item *init)
> > enum trace_flags flag = TRACE_ALL;
> > int ret, fd, mnt_ns_fd = -1;
> >
> > + ret = run_scripts(ACT_PRE_RESTORE);
> > + if (ret != 0) {
> > + pr_err("Aborting restore due to pre-restore script ret code %d\n", ret);
> > + timing_stop(TIME_RESTORE);
> > + write_stats(RESTORE_STATS);
> > + goto out_kill;
>
> The out_kill is wrong fallback for error, it does things that
> weren't yet initialized. Just return -1 (and no even need in
> stopping timing and writing stats).
>
> > + }
> > +
> > fd = open("/proc", O_DIRECTORY | O_RDONLY);
> > if (fd < 0) {
> > pr_perror("Unable to open /proc");
>
--
*****************
Matthew S. Krafczyk
Research Assistant
Massachusetts Institute of Technology
AMS-02 Collaboration,
Based at CERN, Geneva, Switzerland
More information about the CRIU
mailing list