From a80ca1ae81fc52e304e753f6de4ef248df364f9e Mon Sep 17 00:00:00 2001 From: Lars Ellenberg Date: Fri, 27 Dec 2013 17:17:25 +0100 Subject: [PATCH] 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-format-patch failed