[CRIU] [PATCH 3/4] files: add support of O_PATH
Andrew Vagin
avagin at parallels.com
Fri Apr 11 04:47:09 PDT 2014
On Wed, Apr 09, 2014 at 01:26:00PM +0400, Pavel Emelyanov wrote:
> On 04/07/2014 02:00 PM, Andrey Vagin wrote:
>
> > @@ -96,7 +96,10 @@ int send_fds(int sock, struct sockaddr_un *saddr, int len,
> > /*
> > * Simple case -- nothing is changed.
> > */
> > - if (owner_ex.pid == 0) {
> > + if (ret == -EBADF) { /* O_PATH */
>
> "ret == EBADFD" means "file opened with O_PATH" doesn't look like good
> assumption to me. Can we get file flags from somewhere else?
>
> > + p->fown.pid = -1;
We check this assumption in fill_fd_params()
+ if (!(p->flags & O_PATH)) {
+ if (opts->fown.pid < 0) {
+ pr_err("Unable to get owner\n");
+ return 1;
+ }
> > + continue;
> > + } else if (owner_ex.pid == 0) {
> > p->fown.pid = 0;
> > continue;
> > }
> >
>
>
More information about the CRIU
mailing list