Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp570601pxx; Wed, 28 Oct 2020 11:20:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJMY0XYo2sX55y9K01dEuB71mG00Hwlfh1/xUvMLdYzrjEvFTSp3b6WlQQik5iJDrrWu0c X-Received: by 2002:a17:906:370e:: with SMTP id d14mr349267ejc.259.1603909252569; Wed, 28 Oct 2020 11:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603909252; cv=none; d=google.com; s=arc-20160816; b=KcZZrMDxXx3t/DEEMb8Dt/hm3xyrgTH+BbhXLfWwZ9O8Pa0VIoxtX3wxwYjwl7UXKp hmm8MAaDQuc6BWpS3nilKyIPhQrT8+1ao9BqtqgJ2CbMIvVjDmFdHAXa/qgSeCdXHbKr LkyJavf4dGLHNIMwQg9HkqwAQ5z2zIq+kvtANN6pFQd8gEy6bOI3OFZch+felAd1VFqy vygGganZ4ezy7rik4AtNQ9afiXvpBlVou3q4FUS/uvN3NkTcU91jyzGeGaOiAmOMrnu4 g1UgIVolvykdjyvh/7Uq0sqyVwAvLCTzWH6O3shN33z72Npah/XCRwqkRDDtL/62Ba8M ArOA== 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=qibozSlSVjfiVLucUCUCHaOlToJ3VzRKtRkqD3JNLRM=; b=n2ZRejInB7koGdFFtHs2gE0opucEWByOg89/6DWu0CEYGTptvi2UsYP7lJREfLll6l 5sTomHbvTH4Y9mbXCpLJs13UuCp9dxYIiNpeg9BEvUX22fiIGl8W1tY8fD6gXGXesvEk aDTgFKpGewFugQB67Ta3q5fc5fxHUbua7UiW0pPvoSP4v0cyyXUUltNHWtjyl86AJbFR W1HAC2pBK5wkrpBrx1wGzzAQuQJNl/S0YGn8INvpRkcMOWRmNaeK5P8KanPd/yXjDzxS txOj78xJkUHckcmq7Vp+kMGsSAow+WURzXsKWQdWKOX3Yiqr8DMwnQH+bY06MaFogQDS 2qlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=u+SHuCUo; 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 d23si10484edy.397.2020.10.28.11.20.30; Wed, 28 Oct 2020 11:20:52 -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=u+SHuCUo; 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 S1824828AbgJ0SGI (ORCPT + 99 others); Tue, 27 Oct 2020 14:06:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:40326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757270AbgJ0ORR (ORCPT ); Tue, 27 Oct 2020 10:17:17 -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 BA26E2072D; Tue, 27 Oct 2020 14:17:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603808237; bh=nya+DzPfGCgen7n8gz7XXNnfG1S3MiBW7FmTdewTuYI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u+SHuCUoBCXLUNTcBaKYuBCaXx+T1iC7tPr/6LEGLP7LKhhxxNqn44oGnxCvnzZF0 JyS/5yAN3GbFEVC6kV1XeS3XNdlwkKM5Z9TCbIh0Ypmb3WNtqM69Otp2DVPjwVsnUq Ww8dpyszh4lA3ROJUnxtjt0lvPpX1Y/ahe3L0SA8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Karsten Graul , Jakub Kicinski Subject: [PATCH 4.19 008/264] net/smc: fix valid DMBE buffer sizes Date: Tue, 27 Oct 2020 14:51:06 +0100 Message-Id: <20201027135431.048873832@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135430.632029009@linuxfoundation.org> References: <20201027135430.632029009@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 @@ -770,7 +770,7 @@ static struct smc_buf_desc *smcr_new_buf return buf_desc; } -#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)