]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tun: fix blocking read
authorTimur Celik <mail@timurcelik.de>
Sat, 23 Feb 2019 11:53:13 +0000 (12:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Mar 2019 06:10:13 +0000 (07:10 +0100)
commit8b2bc50ee00f3707321676f52a4415201fbf015d
tree8768fb07f40af6fbb0e8c69dac5ffcbcc1754508
parent72628839600e835e3d8fe920009cbeb4d486d297
tun: fix blocking read

[ Upstream commit 71828b2240692cec0e68b8d867bc00e1745e7fae ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/tun.c