]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix random link reset problem
authorErik Hugne <erik.hugne@ericsson.com>
Thu, 23 Apr 2015 13:37:39 +0000 (09:37 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Apr 2015 15:50:34 +0000 (11:50 -0400)
commitdf9a758981342f8863167b0bfe9175c266b2ec15
tree7b2a24877f0ba22180ed214d533102dd3fcb19b5
parent5118fee86b32d860e793945f6b3de668dc100b81
tipc: fix random link reset problem

In the function tipc_sk_rcv(), the stack variable 'err'
is only initialized to TIPC_ERR_NO_PORT for the first
iteration over the link input queue. If a chain of messages
are received from a link, failure to lookup the socket for
any but the first message will cause the message to bounce back
out on a random link.
We fix this by properly initializing err.

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c