Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2739990pxj; Mon, 31 May 2021 09:32:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4Iu93LbQvoTw2J6mKFUbJ+OK89Arw7AeWTiAY5Ps2EBCKnoWPcFxepkqVqnNZp+k26HjD X-Received: by 2002:a17:906:b10e:: with SMTP id u14mr23421560ejy.546.1622478744906; Mon, 31 May 2021 09:32:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622478744; cv=none; d=google.com; s=arc-20160816; b=n2Aq/+nh738YKgAVWbk6YFmAxPjAY1EF1dbko7zTDkWP3tD/YHqYE6yGo4RcRuH357 3wkGkYLhy/lbDtxCqJC4XKQkZ9YivFZH3R2JL9sTrk8faJJ3e2bcVzimSJYCQGwvjLn2 c7NmyaLsZ2LDVczXo0oqJNQjv2N/cd2PmTtJNK5pAzkA+9fSDYfq5rWlkR5aYbnx6jzJ C7CkBfM+iDkg4ZQFjpFxJfSsIyfHNXZ3f760uRDkd2HPd9zGf1PoTJWWETeUUgbfBVU+ wk3G8oEUu4F15aMypNcf7WlZTH9ufc/iQNdIvh7MFDNY6yrcMuAfDMnfbG3tPlG/Owue zvoA== 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=I/4UCbg3IlrjGfC/KPzx+MtViud7M3oy55j8cR/RB6J2HS715PPzhgXa3P7QEuyyrQ GK0GJvN2xsUypZQpm7CB+8uekZ23noLqZ7Mcv5yV8Inyh/zdsSPzVam8bTqooUtqRRiJ Cx7RZi7fu1i7LZ32fKSlrZRhdkgVGOuFQZ6MogP+PaT6BECHYxIm+0WorK2ZW3AI0B5k g/aQA79tPdAlq+OeW3cN0h7X/5QV/vxr9SA6Zbx53Ie1BRWn5tF+r+CnHEkmTyzfu78E r9eWa8zyLz4R6tA9lJRXLvjmpEyVtO6C6PSmYcy1VRhhVEmbvW0KwXvONRRqCBuQsd7e +5Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uCpk15J6; 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 rh9si14400590ejb.589.2021.05.31.09.31.55; Mon, 31 May 2021 09:32:24 -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=uCpk15J6; 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 S234736AbhEaQaR (ORCPT + 99 others); Mon, 31 May 2021 12:30:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:40788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233256AbhEaOpj (ORCPT ); Mon, 31 May 2021 10:45:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F3C8161437; Mon, 31 May 2021 13:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622469328; bh=R7fGHLtuHqWMQLf1kTqQdOKEvzKXPfzIK9wJtXAntKI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uCpk15J6qV+/t0edkpQ7GNNSwe4drnPyk/Hh9KxrHhzybFJd/TcZN1TXcjeJTgjhD lE40y0lOn75dUiloeTpTdKMGIdyWbFpVo2Xf+a57PTYY51gWVYa19Kb9X168llFVBr Lwp+2JP5cjlehRaUiTfxA/3X7JPzoawLtRUqa0dc= 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.12 156/296] nvmet-tcp: fix inline data size comparison in nvmet_tcp_queue_response Date: Mon, 31 May 2021 15:13:31 +0200 Message-Id: <20210531130709.107873224@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130703.762129381@linuxfoundation.org> References: <20210531130703.762129381@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; }