Commit 32e07745 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

sockets: Print error message on unexpected socket state

While been playing with sockets dumping I found a case where
we exit without descriptive error message. Fix it.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent f5388848
......@@ -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);
......
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