
From: Zhuling <zhuling8@huawei.com> Fix socket dumping fail problem when user space has no access to getting socket filter. Conflict:NA Reference:https://gitee.com/src-openeuler/criu/pulls/21 Signed-off-by: Jingxian He <hejingxian@huawei.com> --- criu/sockets.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/criu/sockets.c b/criu/sockets.c index 609bfb1..0c0b0e0 100644 --- a/criu/sockets.c +++ b/criu/sockets.c @@ -372,7 +372,9 @@ static int dump_socket_filter(int sk, SkOptsEntry *soe) ret = getsockopt(sk, SOL_SOCKET, SO_GET_FILTER, NULL, &len); if (ret) { - pr_perror("Can't get socket filter len"); + pr_warn("Can't get socket filter len"); + if (errno == EACCES) + return 0; return ret; } -- 2.27.0