Commit 74af0c22 authored by Pavel Emelyanov's avatar Pavel Emelyanov

inet: Improve messaging in can_dump_inet_sk error paths

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 4648090f
...@@ -93,13 +93,15 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto) ...@@ -93,13 +93,15 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
BUG_ON((sk->sd.family != AF_INET) && (sk->sd.family != AF_INET6)); BUG_ON((sk->sd.family != AF_INET) && (sk->sd.family != AF_INET6));
if (sk->shutdown) { if (sk->shutdown) {
pr_err("Can't dump shutdown inet socket\n"); pr_err("Can't dump shutdown inet socket %x\n",
sk->sd.ino);
return 0; return 0;
} }
if (sk->type == SOCK_DGRAM) { if (sk->type == SOCK_DGRAM) {
if (sk->wqlen != 0) { if (sk->wqlen != 0) {
pr_err("Can't dump corked dgram socket\n"); pr_err("Can't dump corked dgram socket %x\n",
sk->sd.ino);
return 0; return 0;
} }
...@@ -111,7 +113,9 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto) ...@@ -111,7 +113,9 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
} }
if (sk->type != SOCK_STREAM) { if (sk->type != SOCK_STREAM) {
pr_err("Only stream and dgram inet sockets for now\n"); pr_err("Can't dump %d inet socket %x. "
"Only can stream and dgram.\n",
sk->type, sk->sd.ino);
return 0; return 0;
} }
...@@ -123,7 +127,8 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto) ...@@ -123,7 +127,8 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
* requests for listen sockets. Need to pick * requests for listen sockets. Need to pick
* those up and fix the connect job respectively * those up and fix the connect job respectively
*/ */
pr_err("In-flight connection (l)\n"); pr_err("In-flight connection (l) for %x\n",
sk->sd.ino);
return 0; return 0;
} }
break; break;
...@@ -138,7 +143,7 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto) ...@@ -138,7 +143,7 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
/* Trivial case, we just need to create a socket on restore */ /* Trivial case, we just need to create a socket on restore */
break; break;
default: default:
pr_err("Unknown state %d\n", sk->state); pr_err("Unknown inet socket %x state %d\n", sk->sd.ino, sk->state);
return 0; return 0;
} }
...@@ -150,7 +155,7 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto) ...@@ -150,7 +155,7 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
case IPPROTO_UDPLITE: case IPPROTO_UDPLITE:
break; break;
default: default:
pr_err("Unsupported socket proto %d\n", proto); pr_err("Unsupported proto %d for socket %x\n", proto, sk->sd.ino);
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