[Devel,1/5] netlink: restore queues and only then restore opts

Submitted by Andrei Vagin on Feb. 19, 2017, 6:58 a.m.


Message ID 1487487496-12063-2-git-send-email-avagin@openvz.org
State New
Series "A few fixes for netlink sockets"
Headers show

Commit Message

Andrei Vagin Feb. 19, 2017, 6:58 a.m.
From: Andrei Vagin <avagin@virtuozzo.com>

When we restore queues, we set limits to unlimited values,
so then we need to restore required values for them.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
 criu/sk-netlink.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/sk-netlink.c b/criu/sk-netlink.c
index 89a5d9c..3966f82 100644
--- a/criu/sk-netlink.c
+++ b/criu/sk-netlink.c
@@ -270,10 +270,10 @@  static int open_netlink_sk(struct file_desc *d, int *new_fd)
 	if (rst_file_params(sk, nse->fown, nse->flags))
 		goto err;
-	if (restore_socket_opts(sk, nse->opts))
+	if (restore_netlink_queue(sk, nse->id))
 		goto err;
-	if (restore_netlink_queue(sk, nse->id))
+	if (restore_socket_opts(sk, nse->opts))
 		goto err;
 	*new_fd = sk;