aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_receiver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_receiver.c')
-rw-r--r--drivers/block/drbd/drbd_receiver.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 9db93ff11c02..017eeb745ed9 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -2837,10 +2837,10 @@ static int receive_SyncParam(struct drbd_conf *mdev, enum drbd_packets cmd, unsi
2837 2837
2838 if (apv >= 88) { 2838 if (apv >= 88) {
2839 if (apv == 88) { 2839 if (apv == 88) {
2840 if (data_size > SHARED_SECRET_MAX) { 2840 if (data_size > SHARED_SECRET_MAX || data_size == 0) {
2841 dev_err(DEV, "verify-alg too long, " 2841 dev_err(DEV, "verify-alg of wrong size, "
2842 "peer wants %u, accepting only %u byte\n", 2842 "peer wants %u, accepting only up to %u byte\n",
2843 data_size, SHARED_SECRET_MAX); 2843 data_size, SHARED_SECRET_MAX);
2844 return false; 2844 return false;
2845 } 2845 }
2846 2846