[CRIU] [PATCH] sockets: Print error message on unexpected socket
state
Cyrill Gorcunov
gorcunov at openvz.org
Fri May 11 06:24:22 EDT 2012
While been playing with sockets dumping I found a case where
we exit without descriptive error message. Fix it.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
sk-unix.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/sk-unix.c b/sk-unix.c
index 7100a58..e465220 100644
--- a/sk-unix.c
+++ b/sk-unix.c
@@ -90,8 +90,11 @@ static int can_dump_unix_sk(const struct unix_sk_desc *sk)
case TCP_ESTABLISHED:
break;
case TCP_CLOSE:
- if (sk->type != SOCK_DGRAM)
+ if (sk->type != SOCK_DGRAM) {
+ pr_err("Unexpected state %d on type %d\n",
+ sk->state, sk->type);
return 0;
+ }
break;
default:
pr_err("Unknown state %d\n", sk->state);
--
1.7.7.6
More information about the CRIU
mailing list