Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp840344rwb; Fri, 13 Jan 2023 04:59:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXt/bmLhiKqVQ4e7lw6wMgxBPKh/UmG+h0zEQ2HR9VAaV4fvI0ZQhB7o9MVUDs76SR+Xooqf X-Received: by 2002:a05:6a00:d5e:b0:589:a782:470c with SMTP id n30-20020a056a000d5e00b00589a782470cmr8795055pfv.2.1673614776878; Fri, 13 Jan 2023 04:59:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673614776; cv=none; d=google.com; s=arc-20160816; b=epexW1tN/nL6mn7ZRq6JHhNvn7CqkZSf0f4LtUrC7+PHjkPhL8ejYNFtm7oFeUpR06 nAF3gM2DPU1O7rt5Oorc+PICkoQhHWQfeFycCv21EFFT1URo5qNP/sUW3HtAElHLKAU5 0vnWEoUF5Mvaiu/uDxRSTLU8N8VLAbERb6v0+qCmoiw1imuRliKN/5DzY4ssB5a2a6hL qN97TduClxNuS4DA1QFWf5nmNI+HszVboHebdtmPOl36CpUVDPd8qXc+TkdGWklJn7Jm tHQG4+M/zrnJmNT+qQSQGZdvrT0FR0YdcvV3rA8XHeoIcSfBxIUfRh/K93sxg5Nxgk9T uxOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HcVlem0HZR7YKz5CwTwpHOGM7j8McIJNietyZfce8tM=; b=S7ImFXeODOM2DaCo3ak65sg/WyRjEyxJU+Pa945JTz3QHZLt0IqOO/VGQwHryyiZ/+ NUKNqWd0NkIaKzh7qX/YrHpoUTNvLJh5H4LWDVWiU5YK9vThDb51kw+L5Fqqrm9E/YLa MH9uXJhA7GGIeEwkvD59Dg6fYZ5n6bZcMYQt+AvgYukX/Gur95qnQXAm8ehkVwTT6YAj jAK1h3vc65/jsxJHX7qP59U8WgfiBIYfZlniVubpFdtmS4G5QVWWlYR009fB+uv16cdl RTf9HYqA2WE+GS2fRXrbUTTlB1N2EC5dwITx7wILpgEmTlxvmMNzlZizCi465U18vQUP /ZaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linbit-com.20210112.gappssmtp.com header.s=20210112 header.b="lG6G/hEi"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y38-20020a056a00182600b0058bbe63c377si1148429pfa.2.2023.01.13.04.59.29; Fri, 13 Jan 2023 04:59:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linbit-com.20210112.gappssmtp.com header.s=20210112 header.b="lG6G/hEi"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241573AbjAMMpZ (ORCPT + 51 others); Fri, 13 Jan 2023 07:45:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241928AbjAMMoI (ORCPT ); Fri, 13 Jan 2023 07:44:08 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E2BA3D5E4 for ; Fri, 13 Jan 2023 04:36:24 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id az20so32929109ejc.1 for ; Fri, 13 Jan 2023 04:36:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linbit-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HcVlem0HZR7YKz5CwTwpHOGM7j8McIJNietyZfce8tM=; b=lG6G/hEiefVVw2KVntwXpYtJaFeZcpH/bmr8zyHNCudsGl5VmkDU4N+8sUHUREXchX 9t4DexO2EUVb8fflnf450J/HAESsipmjohr0+8leLKzThOAy98UQ2LNsyLzog2q6Kzi+ QVc7cJtKfrFOMAyGHpbwA7+OSX5P+PCXYau7IJ/hQGeeG8IpWzilFfaTpUp/ICcu55XU EWCiyQyNs3M3/+PLd/ykAbv6s4xWjuiggSTvES0cZ505UVSpnzqJxFikHe08w8as1LD7 eZUOw5vgYoOmRVieRXXUIyiZkfFZ95VHB7frMXY1SD9V03Qlh0ffq17r7g+1O8AfcAJ8 iNag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HcVlem0HZR7YKz5CwTwpHOGM7j8McIJNietyZfce8tM=; b=miA7YI6qVMDz4dCAEmln+QmqVroLcPGa3bG2Ic6Vl67VGzJ2+lP7nUva6LiKETcrSo e8lfNeKqGGqRTpjh3KxgysJZVSBI/3nDkknGTDsWG2CM/0neZfBk6eC9ZWisKYvTPq4s PKBzK/sv694r0sOjqj9NxodeF7c5oPAAEqgOLv1dTamwaLANKjrmZZ+DrczyF9tKoDqa ck7Jn7mp6ug3J+nJv6veE44XjXI7A/AHoPLEVctiGbRAuzUY1DxTbntZ0KwyYM9WZ1la jVHEXeStUQ91Ysw6jC9I4WxFKbDNplzjgpQKTT7wp2GPAdLcx9ZZE7Qmg1ybbHbtDA2Y Kbxw== X-Gm-Message-State: AFqh2kop5xlXbJoUH/TMRk+D6/QkYgCLg8xwWtN5ZhpgvukDshm5A6H8 t2/fJIJaum0PQKmy1yEt6MjaGw== X-Received: by 2002:a17:907:8b89:b0:7c1:6f86:eeb with SMTP id tb9-20020a1709078b8900b007c16f860eebmr66679431ejc.7.1673613344302; Fri, 13 Jan 2023 04:35:44 -0800 (PST) Received: from localhost.localdomain (h082218028181.host.wavenet.at. [82.218.28.181]) by smtp.gmail.com with ESMTPSA id 17-20020a170906329100b007c0bb571da5sm8402496ejw.41.2023.01.13.04.35.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 04:35:43 -0800 (PST) From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= To: Jens Axboe Cc: drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org, Lars Ellenberg , Philipp Reisner , linux-block@vger.kernel.org, Robert Altnoeder , =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= , Joel Colledge Subject: [PATCH 2/8] drbd: fix DRBD_VOLUME_MAX 65535 -> 65534 Date: Fri, 13 Jan 2023 13:35:32 +0100 Message-Id: <20230113123538.144276-3-christoph.boehmwalder@linbit.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230113123538.144276-1-christoph.boehmwalder@linbit.com> References: <20230113123538.144276-1-christoph.boehmwalder@linbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robert Altnoeder The protocol uses -1 as a reserved value for 'no specific volume', and since the protocol field is a 16 bit unsigned value, -1 is converted to 65535. Therefore, limit the range of valid volume numbers to [0, 65534]. Signed-off-by: Robert Altnoeder Signed-off-by: Christoph Böhmwalder Reviewed-by: Joel Colledge --- include/linux/drbd_limits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/drbd_limits.h b/include/linux/drbd_limits.h index d64271ccece4..058f7600f79c 100644 --- a/include/linux/drbd_limits.h +++ b/include/linux/drbd_limits.h @@ -21,7 +21,7 @@ #define DRBD_MINOR_COUNT_DEF 32 #define DRBD_MINOR_COUNT_SCALE '1' -#define DRBD_VOLUME_MAX 65535 +#define DRBD_VOLUME_MAX 65534 #define DRBD_DIALOG_REFRESH_MIN 0 #define DRBD_DIALOG_REFRESH_MAX 600 -- 2.38.1