summaryrefslogtreecommitdiff
path: root/drivers/net/wireguard/socket.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-05-04 17:53:42 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-05-04 18:03:51 -0600
commit33d6e27f7e95b5a46080bea803090be601ebf900 (patch)
tree57cf0e59c102d05f8dd391ecbd080788687b9797 /drivers/net/wireguard/socket.c
parent67133c29b6ece5ef6102afdd39af52dee59d4d63 (diff)
downloadwireguard-linux-trimmed-33d6e27f7e95b5a46080bea803090be601ebf900.tar.gz
wireguard-linux-trimmed-33d6e27f7e95b5a46080bea803090be601ebf900.zip
wireguard: send/receive: cond_resched() when processing worker ringbuffers
Users with pathological hardware reported CPU stalls on CONFIG_ PREEMPT_VOLUNTARY=y, because the ringbuffers would stay full, meaning these workers would never terminate. That turned out not to be okay on systems without forced preemption, which Sultan observed. This commit adds a cond_resched() to the bottom of each loop iteration, so that these workers don't hog the core. Note that we don't need this on the napi poll worker, since that terminates after its budget is expended. Suggested-by: Sultan Alsawaf <sultan@kerneltoast.com> Reported-by: Wang Jian <larkwang@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'drivers/net/wireguard/socket.c')
0 files changed, 0 insertions, 0 deletions