From: Lars Ellenberg Date: Fri, 27 Dec 2013 16:17:25 +0000 (+0100) Subject: drbd: fix a race stopping the worker thread X-Git-Tag: omap-for-v3.17/fixes-against-rc2~74^2~54 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a80ca1ae81fc52e304e753f6de4ef248df364f9e;p=pandora-kernel.git drbd: fix a race stopping the worker thread We may implicitly call drbd_send() from inside wait_for_work(), via maybe_send_barrier(). If the "stop" signal was send just before that, drbd_send() would call flush_signals(), and we would run an unbounded schedule() afterwards. Fix: check for thread_state == RUNNING before we schedule() Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- Reading git-diff-tree failed