OSDN Git Service

tun: fix blocking read
authorTimur Celik <mail@timurcelik.de>
Sat, 23 Feb 2019 11:53:13 +0000 (12:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Feb 2019 06:11:53 +0000 (22:11 -0800)
commit71828b2240692cec0e68b8d867bc00e1745e7fae
tree5a20187191aaf271f6d39b65407c62e0dbd9c389
parentcffde20164d2a1e7d647b63b4d8fac11bf48b500
tun: fix blocking read

This patch moves setting of the current state into the loop. Otherwise
the task may end up in a busy wait loop if none of the break conditions
are met.

Signed-off-by: Timur Celik <mail@timurcelik.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c