Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2826849pxb; Mon, 1 Nov 2021 02:38:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRpvLgLLq7cI6aKJpJxOoayKArxoRUazWL1bK20bkZrLQQX/5ivfKk139N0oThM2VLebgK X-Received: by 2002:a17:906:dc94:: with SMTP id cs20mr33402931ejc.367.1635759501763; Mon, 01 Nov 2021 02:38:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635759501; cv=none; d=google.com; s=arc-20160816; b=ZuXyBLKJ3rcEK/Q4+b0uPiX4qfx3JKdwJ+7tn5CWcu2JTxzmVFdbQTyga7SHXbNRdd zNsTQgCpLyH9z8r3MykE6he5FfzqCrzj4po+pT0u0lJJYfVh1Y2ce1okJrIbJ4dMNuIi dmQ7OwjSTzpPJ798BxZLZy1WQqyRz0vYq6w5Z11gW9oxwi3J7Gh4Mdy32Ur6vgMhbP+7 egK8W7QFrvO1kMDQSKKu3oo1yhdUARjSMZodpwnNgBaQJgYS1y+iBIOEzFElKO4fsRWo c/BDeOfbyn/YW5pPe0EVwhQbdq6zhT6iBT34aP/GSCEQ/FAoWSWO3mVLdgnWcNtpQOka BwTQ== 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=fD3M2oE9P17V9LDHdLtx0M+rxpuYvFgQU+yDX83dKBc=; b=k+WjjeiVfkQ4hi+YCNkfnvC6FKIXkqLxE95IaVJ+V8keOScO6zznYZ8KbxrHFEfD4W UU0RtoV2GEMttHRpEjAufBm8sCzClAtb41bYgcK+SIla1DZsjd/gM3piS54Dp1SCbCeg HCuJ+2F46qDVbHqm4W6EZUskHpceJbKoCqe+eV+v+kioZ/eOLgBwsQEaXJXOx9MASq+l /ts0nrF6VO+Th9O11L+Bf7Ue02DR51xRfngPw7V/YsO4MUfj68WyTA9x3NixuLX9ayfD CEGx+t88BvTc6Ng+dEVCkllj1/8MhpmyPCXLSbibb1YvZ3kdBvQcSoTiCpjAkXcUcSvZ /RVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lOijC0fD; 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 hq42si572735ejc.393.2021.11.01.02.37.58; Mon, 01 Nov 2021 02:38:21 -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=lOijC0fD; 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 S233274AbhKAJiB (ORCPT + 99 others); Mon, 1 Nov 2021 05:38:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:43560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232888AbhKAJfo (ORCPT ); Mon, 1 Nov 2021 05:35:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5B035610CB; Mon, 1 Nov 2021 09:25:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635758746; bh=mihaGiEok+Hj226MMQ1qfWL5u3i23tWW2o5SAc+iwIU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lOijC0fDOchyyN6OFPLp5TfNBoKIErXZxrLko1ZlzrMDu5OVqsCEhVPF8jmRO8iy5 MPtBOIF+MQtFg1dbTcfmsxY3syDsGM6qNW/u8PwmXEsujXNMxFAiYUgJ8LFUC5wT04 bJoCB9R0bs+9QnYpS+KhVQsMtjH9UU8F07ZDruN0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Varun Prakash , Sagi Grimberg , Christoph Hellwig Subject: [PATCH 5.10 42/77] nvme-tcp: fix data digest pointer calculation Date: Mon, 1 Nov 2021 10:17:30 +0100 Message-Id: <20211101082520.717607422@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211101082511.254155853@linuxfoundation.org> References: <20211101082511.254155853@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: Varun Prakash commit d89b9f3bbb58e9e378881209756b0723694f22ff upstream. ddgst is of type __le32, &req->ddgst + req->offset increases &req->ddgst by 4 * req->offset, fix this by type casting &req->ddgst to u8 *. Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver") Signed-off-by: Varun Prakash Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Greg Kroah-Hartman --- drivers/nvme/host/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -1040,7 +1040,7 @@ static int nvme_tcp_try_send_ddgst(struc int ret; struct msghdr msg = { .msg_flags = MSG_DONTWAIT }; struct kvec iov = { - .iov_base = &req->ddgst + req->offset, + .iov_base = (u8 *)&req->ddgst + req->offset, .iov_len = NVME_TCP_DIGEST_LENGTH - req->offset };