]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix bug in socket reception function
authorJon Paul Maloy <jon.maloy@ericsson.com>
Sun, 8 Feb 2015 16:10:50 +0000 (11:10 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Feb 2015 21:09:25 +0000 (13:09 -0800)
commit47113069ed9aa4b5f846fd5d104c9a06c808ef49
treea2dbbaa21bba03e86ac8bf58a7aedd4f5f2ddd2b
parent2882c075895758aab03c595b810700eda85cda0f
tipc: fix bug in socket reception function

In commit 88e3df0c5485f2af869024d8492acb5b81425830 ("tipc: resolve race
problem at unicast message reception") we introduced a time limit
for how long the function tipc_sk_eneque() would be allowed to execute
its loop. Unfortunately, the test for when this limit is passed was put
in the wrong place, resulting in a lost message when the test is true.

We fix this by moving the test to before we dequeue the next buffer
from the input queue.

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