Commit 6de7b7b3 authored by Pavel Emelyanov's avatar Pavel Emelyanov

udp: Don't dump dgram socket with corked data in it

We can't dump application that put some data in write queue and is
about to add more, as there's currently no way to fetch this data
back, and just dropping it means breaking the app-level protocol.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent a897e060
......@@ -100,8 +100,14 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk)
return 0;
}
if (sk->type == SOCK_DGRAM)
if (sk->type == SOCK_DGRAM) {
if (sk->wqlen != 0) {
pr_err("Can't dump corked dgram socket\n");
return 0;
}
return 1;
}
if (sk->type != SOCK_STREAM) {
pr_err("Only stream and dgram inet sockets for now\n");
......
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