]> git.baikalelectronics.ru Git - kernel.git/commit
xen-netback: stop the guest rx thread after a fatal error
authorDavid Vrabel <david.vrabel@citrix.com>
Mon, 2 Feb 2015 16:57:51 +0000 (16:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Feb 2015 03:39:04 +0000 (19:39 -0800)
commitab391050c47d280128abb307bfc0aab0ff06d2cd
tree3fb44adcfd6de16f9e3ceddcf46d7a2c9c54532c
parent0685da651ce6165f364848743f1e4012cfc29edd
xen-netback: stop the guest rx thread after a fatal error

After commit b51a6d48e85a0a4ac931df1b1f0b8da5952de02d (xen-netback:
disable rogue vif in kthread context), a fatal (protocol) error would
leave the guest Rx thread spinning, wasting CPU time.  Commit
c84ec80f92b5ab4ff7afcad5b1df1b23b4468aaf (xen-netback: reintroduce
guest Rx stall detection) made this even worse by removing a
cond_resched() from this path.

Since a fatal error is non-recoverable, just allow the guest Rx thread
to exit.  This requires taking additional refs to the task so the
thread exiting early is handled safely.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reported-by: Julien Grall <julien.grall@linaro.org>
Tested-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netback/interface.c
drivers/net/xen-netback/netback.c