Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp252921pxx; Wed, 28 Oct 2020 04:10:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiR19d4kSCxkyR0JMvVEF45lDMwMRBRs8SlzJcFGa0ZzaRgLpv5NnFbMlj4TQDsYj9yEfJ X-Received: by 2002:a05:6402:1585:: with SMTP id c5mr7239388edv.278.1603883400898; Wed, 28 Oct 2020 04:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603883400; cv=none; d=google.com; s=arc-20160816; b=iVGHwDALNjFgbdKYxVr+YcWxOeKX7v774jgzpMYaWKBRRG4hhk6jQyDP58kealJE8N YM3wktolHpDPd/mg7KP+aOuPEFNjVTna7Rx4QlBlIhtxyBh8UCzU0PGTjhYDpALwQW0Z 1pZEZXD+I1pIDLZacIfgtE6MXA1GoYu3+qNQY1llMNNUEh9dS3XJugBzx2MfgkM9pU2J 0jTkBvqOzGI9x/u4WmHd5i4LraexFhFdp4s+YnoI4OKLesChonFuqHr0BhqGP1R7P+RU Uzt+k2gU9DGRj3fwRABCmR9jLLOuqYuGXI8EJtodcRikYHXeWJjx5M5dLO3gKkWfjva0 Tt0A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LQAQK2viHTfwjdmaCS75vuxTU81RVBireGE80+Evyvo=; b=HXZoAcE9QsWee92ukaHiHMnRMjX8JYVMFE4o9bD+yAgw39wamUYmgHgAc+vj/DROR6 7ocR01ShpMY6/U4shSJgV8uE17XyexU6BdnLNr5mWFPUfi4YHBHTUr97FQ7JLdNWVrsB Aq6AhJZjdg3q7fW0xpMNrjswaZ+AzNJn64aeqgl9PuhIcWOe+TOlOkLE2nh+f+MmAyyi TZnXmRCT7tVBFAQZG+D7CQU89WmvvlrQnhia9/XlWXypkNlwKStXKSzjWSDKQyc+eqgW sYl8KXayGIQvLQdhN3rLYkaq0ggb45Pqh7H/tVcS6svRw+hPKyo+4+glfF5Xtny/7g5X Jz5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1V700P0m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x26si2664388eds.99.2020.10.28.04.09.39; Wed, 28 Oct 2020 04:10:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1V700P0m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1786630AbgJ0O7y (ORCPT + 99 others); Tue, 27 Oct 2020 10:59:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:49624 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1766984AbgJ0Otb (ORCPT ); Tue, 27 Oct 2020 10:49:31 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3818F206E5; Tue, 27 Oct 2020 14:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810170; bh=IW4OFwaG+5rdIXjJz8in1yOtpnQYPsFvls9z1sfKUzk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1V700P0mNzGggQT3Irx4tpM7asSGsmwaqxmFHCW4JOq6V42dxVN0H2YgLabsIB7V2 KaEZwOox40u6ReHuU/mb0firIiMWJkh7oupHdtLKibABmCs/Wc8QAUrB4P5Hs5MXHA aNnEvX86trM4ukxPoTcV5iddpnV17GHYkyputszU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Karsten Graul , Jakub Kicinski Subject: [PATCH 5.8 014/633] net/smc: fix valid DMBE buffer sizes Date: Tue, 27 Oct 2020 14:45:57 +0100 Message-Id: <20201027135523.356422937@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Karsten Graul [ Upstream commit ef12ad45880b696eb993d86c481ca891836ab593 ] The SMCD_DMBE_SIZES should include all valid DMBE buffer sizes, so the correct value is 6 which means 1MB. With 7 the registration of an ISM buffer would always fail because of the invalid size requested. Fix that and set the value to 6. Fixes: c6ba7c9ba43d ("net/smc: add base infrastructure for SMC-D and ISM") Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/smc/smc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -1595,7 +1595,7 @@ out: return rc; } -#define SMCD_DMBE_SIZES 7 /* 0 -> 16KB, 1 -> 32KB, .. 6 -> 1MB */ +#define SMCD_DMBE_SIZES 6 /* 0 -> 16KB, 1 -> 32KB, .. 6 -> 1MB */ static struct smc_buf_desc *smcd_new_buf_create(struct smc_link_group *lgr, bool is_dmb, int bufsize)