diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2009-11-16 15:58:04 +0100 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2009-11-24 18:12:13 +0100 |
commit | 0b33a9164aca6332bf4a117af5528dea9675d782 (patch) | |
tree | ed825f7c748a362429aebcdb82ce836d1fcd31b0 /drivers/block/drbd | |
parent | 6c6c7951be7652f86109f2193651b78d90907c0d (diff) | |
download | blackbird-obmc-linux-0b33a9164aca6332bf4a117af5528dea9675d782.tar.gz blackbird-obmc-linux-0b33a9164aca6332bf4a117af5528dea9675d782.zip |
add missing state change on corrupt packet header in drbd_recv_header
Otherwise the 'state fixup' in the receiver will change to Unconnected,
but the receiver will terminate itself, and any attempt at 'down'ing
that drbd later will block forever.
see also Bugz. #259
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 9bbc509443e5..fb29a75053ef 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -3499,8 +3499,10 @@ static void drbdd(struct drbd_conf *mdev) while (get_t_state(&mdev->receiver) == Running) { drbd_thread_current_set_cpu(mdev); - if (!drbd_recv_header(mdev, header)) + if (!drbd_recv_header(mdev, header)) { + drbd_force_state(mdev, NS(conn, C_PROTOCOL_ERROR)); break; + } if (header->command < P_MAX_CMD) handler = drbd_cmd_handler[header->command]; |