[CRIU] [PATCH 1/5] files: Fix crossing unused and service fds of shared fd tables
Cyrill Gorcunov
gorcunov at gmail.com
Fri Jun 9 22:17:33 MSK 2017
On Thu, Jun 08, 2017 at 02:33:31PM +0300, Kirill Tkhai wrote:
> >> +int service_fd_min_fd(struct pstree_item *item)
> >> {
> >> - return service_fd_rlim_cur - (SERVICE_FD_MAX - 1) - SERVICE_FD_MAX * service_fd_id;
> >> + struct fdt *fdt = rsti(item)->fdt;
> >> + int id = 0;
> >> +
> >> + if (fdt)
> >> + id = fdt->nr - 1;
> >
> > Why -1 here?
>
> service_fd has numbers from 0 to fdt->nr-1, so we have to take the biggest number,
> and it is be the biggest offset. I based on this. Is there wrong assumption?
That's fine. Thanks.
More information about the CRIU
mailing list