Commit 461a4667 authored by Pavel Emelyanov's avatar Pavel Emelyanov

kerndat: Don't fail it tcp_*mem sysctls are missing

This can hppen if criu is run in container.
Reported-by: 's avatarFrederico Araujo <araujof@gmail.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 537621d9
...@@ -130,15 +130,17 @@ static int tcp_read_sysctl_limits(void) ...@@ -130,15 +130,17 @@ static int tcp_read_sysctl_limits(void)
* availabe for send/read queues on restore. * availabe for send/read queues on restore.
*/ */
ret = sysctl_op(req, CTL_READ); ret = sysctl_op(req, CTL_READ);
if (ret) if (ret) {
return ret; pr_warn("TCP mem sysctls are not available. Using defaults.\n");
goto out;
}
tcp_max_wshare = min(tcp_max_wshare, (int)vect[0][2]); tcp_max_wshare = min(tcp_max_wshare, (int)vect[0][2]);
tcp_max_rshare = min(tcp_max_rshare, (int)vect[1][2]); tcp_max_rshare = min(tcp_max_rshare, (int)vect[1][2]);
if (tcp_max_wshare < 128 || tcp_max_rshare < 128) if (tcp_max_wshare < 128 || tcp_max_rshare < 128)
pr_warn("The memory limits for TCP queues are suspiciously small\n"); pr_warn("The memory limits for TCP queues are suspiciously small\n");
out:
pr_debug("TCP queue memory limits are %d:%d\n", tcp_max_wshare, tcp_max_rshare); pr_debug("TCP queue memory limits are %d:%d\n", tcp_max_wshare, tcp_max_rshare);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment