[CRIU] [PATCH 1/4] sk-unix: Save mnt_id for bindmounted entries
Cyrill Gorcunov
gorcunov at gmail.com
Wed Aug 30 09:43:27 MSK 2017
On Tue, Aug 29, 2017 at 04:24:04PM -0700, Andrey Vagin wrote:
...
> > + sk->mnt_id = mi->mnt_id;
> > + if (sk->type != SOCK_DGRAM && sk->state != TCP_CLOSE) {
> > + pr_err("Unsupported bindmounted socket ino %#x at %s\n",
> > + (int)st.st_ino, mi->mountpoint);
> > + ret = -1;
> > + break;
> > + }
> > + }
> > + }
>
> You have to report an error, if you can't find a socker.
True, I'll update it on top.
> > +
> > + /*
> > + * Bind-mounted sockets.
> > + */
> > + optional uint32 mnt_id = 17;
>
> A socket can be bind-mounted in a few places.
Already addressed in v2 I've sent:
+ if (sk->mnt_id) {
+ pr_err("Many bindings for sockets are not yet supported %#x at %s\n",
+ (int)st.st_ino, mi->mountpoint);
+ ret = -1;
+ } else
+ sk->mnt_id = mi->mnt_id;
+ if (sk->type != SOCK_DGRAM && sk->state != TCP_CLOSE) {
+ pr_err("Unsupported bindmounted socket ino %#x at %s\n",
+ (int)st.st_ino, mi->mountpoint);
+ ret = -1;
+ }
+ break;
More information about the CRIU
mailing list