Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2662533pxj; Mon, 31 May 2021 07:42:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNJw6ERxJMONjbTWzSlZNq+wwAqH5m5gwzteSVvI6FwDARKtTvacdNBeW8CyumF8/7ivHs X-Received: by 2002:a92:9411:: with SMTP id c17mr18807463ili.264.1622472126235; Mon, 31 May 2021 07:42:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622472126; cv=none; d=google.com; s=arc-20160816; b=rq/H0Orbdzj936oTTogRE5w2ZfhzI9p6HN4fAvtjHf8GVfDQjH/aUDbOlSoQ/boLdw 9HyPhIbLZCxjUx0c2Lvobbaz9SdZ4bFz0+zJKkZkwhYZw5KiE3pIjKlaEd1YyILGSqR2 CIe42rBQxuNv48W8cD6q49DGlXSOW5nvCXoRocPZ9OulXGD1+qdhLvS69SRVzOsaz4Ce BKBT5DahUZibkguy0dpBKHGGgygdFto9kMVUNA+4mCeZkKFsfC8MNj0SJ5Vll7PK6h3c HIeQz522EixP/UWCQO3unSOaGbEL31Afxh5WBnM8iRlmyKd5bl9lnDBw7gA/8gdEpmrS M2XQ== 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=bdCvZXPua4mhZTpPlQwwABAczk1mC/QAlOzcTHxRT/o=; b=GM9wJZVxgF6+B6tilERcj6FF8mMi7wVgqc2lSRKBfmVMJW41Jp0vpCJC9ljIdpi6rg DPpwl8a1nHLx5cL32mTA+97c9mGnCOI0iAEFQywsMDlCuK3nCRc3ANUaQ4UrZdJUrZu8 GfXy8343LfX0phFii/lF5dLZhwMdMVW0SuoTiuq75I+mDupCUuf5I192QGJ3qt725uvZ DH9B9T0iBiaPQqDTqIIDEVfxhBzQfV6nSBRSQk/zRDs0LvPGjotAsvOplVV2s49Zgp4b V3E0ff02pUVof4BdWMDtMGROaO2KAA2XIM1RtW7ekuyt44c54QVmcl19B373nKBSLftJ iB1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JY9roNVD; 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=pass (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 w31si13907423jal.77.2021.05.31.07.41.52; Mon, 31 May 2021 07:42:06 -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=@linuxfoundation.org header.s=korg header.b=JY9roNVD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233365AbhEaOl0 (ORCPT + 99 others); Mon, 31 May 2021 10:41:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:60416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232897AbhEaN56 (ORCPT ); Mon, 31 May 2021 09:57:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8AC7861940; Mon, 31 May 2021 13:35:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468124; bh=R7fGHLtuHqWMQLf1kTqQdOKEvzKXPfzIK9wJtXAntKI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JY9roNVD4HQr3VfMLHuUQALxnJP1blIIERakKrYVE/nCNkMNUgFden0nvV/czpXUK uQFyGz2F8V5JxvQAjh2vzY7kYrEq8tud1Bf1EhgjAQanmlfP2uw4BUThJAnupuqNKS h+zbYPKd2kYqcC1u8CWSj8unPKNIWXdsVkjoiwrU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hou Pu , Sagi Grimberg , Christoph Hellwig Subject: [PATCH 5.10 126/252] nvmet-tcp: fix inline data size comparison in nvmet_tcp_queue_response Date: Mon, 31 May 2021 15:13:11 +0200 Message-Id: <20210531130702.293479967@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@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: Hou Pu commit 25df1acd2d36eb72b14c3d00f6b861b1e00b3aab upstream. Using "<=" instead "<" to compare inline data size. Fixes: bdaf13279192 ("nvmet-tcp: fix a segmentation fault during io parsing error") Signed-off-by: Hou Pu Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Greg Kroah-Hartman --- drivers/nvme/target/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/nvme/target/tcp.c +++ b/drivers/nvme/target/tcp.c @@ -538,7 +538,7 @@ static void nvmet_tcp_queue_response(str * nvmet_req_init is completed. */ if (queue->rcv_state == NVMET_TCP_RECV_PDU && - len && len < cmd->req.port->inline_data_size && + len && len <= cmd->req.port->inline_data_size && nvme_is_write(cmd->req.cmd)) return; }