Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1363089pxk; Fri, 2 Oct 2020 07:49:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGz2kI8l2IZh/3nT9CQSd60AQGWH/8PhDqpJq4kgDZhEVTQ4R2ddfRXBhJK2hL8flImEOi X-Received: by 2002:a17:906:a841:: with SMTP id dx1mr2707667ejb.520.1601650157784; Fri, 02 Oct 2020 07:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601650157; cv=none; d=google.com; s=arc-20160816; b=PtcP+udNyPpOj0fzJxLhapvcYGOhwEkTQv6P8Z+UJsBsdNflmfnMSN+qzpiqr/k36S 94gyyWM3AtH2H2MjMIhXkRCBP0lZugNeIErsSAYCLILLRvP3hLdkt/6u4CJGzpgYgDnW I+FPjUGcgarH/EjCSq5AduYoXvrYQEIolZyjVvF2d8dqzhvVeCJQm/iXnxn20jHC4vSl P2jXgw3huMuAPOhpYKzFjGKEeEWGHZPynw4amnPNog5ySKq/GIKF5qa1B+Q4LZZna+HR Pg2BpVcW5BgWbrmSyxeEufs3b0IISE/3L2ih+5Q3biyZ06nAFUBwoAi86W4QOK2Lqhzw rR9w== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=JX2FxwIrrPXuM/u/Qno1EBAL0lJUlKuwL4H9trYkJ/w=; b=M6kohPFfbd/a6dsvl7wNXzAGBa8/LqWozj41rG6FBh9GBibeT8y+0fbszEcH2HkVZX 7cBNlu9MjxSxzvP68td7bjmgk6wwRb0AYYWW2Z07CShzKNwoSjN9C75LFXu8ksEFJZN2 HaznJcqusRu3guOEHxwRFlytKj7zjk9SdLb/XjETuPKV+QP66sRv/MvLWjrMwn9XhsG9 n0a3R5Brtq08IP7RPfHA2kNgsazHlqS/eOEZHA5hTNUZHr4aqaQu8Bn4U++gp/4l8OEG UGJ3tvK1zLH7QbtsyuOIJ68aYNMw7xb7EUvWeZCL90d4p7i0SBULXoLxTbJqblmfKrwp K4Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernelim-com.20150623.gappssmtp.com header.s=20150623 header.b=HMPEBDcn; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k17si1242473ejc.412.2020.10.02.07.48.42; Fri, 02 Oct 2020 07:49:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@kernelim-com.20150623.gappssmtp.com header.s=20150623 header.b=HMPEBDcn; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388002AbgJBOsj (ORCPT + 99 others); Fri, 2 Oct 2020 10:48:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387984AbgJBOsi (ORCPT ); Fri, 2 Oct 2020 10:48:38 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38591C0613E2 for ; Fri, 2 Oct 2020 07:48:37 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id t10so2148347wrv.1 for ; Fri, 02 Oct 2020 07:48:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernelim-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JX2FxwIrrPXuM/u/Qno1EBAL0lJUlKuwL4H9trYkJ/w=; b=HMPEBDcnI+9aYkikeCqm4WkYHBElYJ5zwTB0TckPg4CxxKwJRurWPrPVxKM1CTnpmK 0NB6r5SoYtO7ajWvCGnWfNS5/Vvgvd8Xtaa00+vTfKA9oZrKFInednpFmxFEjiL3o3OI p2bH3MPW/URATFK4WLEezkO3+3tpL4Zh2HKbyoiGZhUrBqBzJABQdgRqq14rzntFbT0K Mr+girQtXk5DtiF71ivjiLrFD8C9HpIDil/hrpoaoJlGJDtH/C9Nysv/nquKbs14oy8+ 6Rqf/cvzb0FEZHn4tA/3PIOB729qXe3ruyBIN6TfK/8ICwnjj2zAc4eQxP2jq0AMEza0 m5iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JX2FxwIrrPXuM/u/Qno1EBAL0lJUlKuwL4H9trYkJ/w=; b=Jr/a4Honry+iFD1qgZp8cTm9Mizg1I9+hpAl96LsmU3VIOSRzjlwwVA7Fa6TP3hTRU /uAdXIJnkXTj8ODTQ0W7oVhnPqtD4zIvXU+4tWamu5q61x4AU0ivmziT7tNe7mKjixgy vuqaZs1JwLNihGQDpAJM+TeeapvVhV8L21xTKnuX8mBk1s4J4v3HpFbIMN2nCgXQ9JdN 5keCcUkcFtQUaHd/6e6AWNZJOC+/2FflzRBoaD153uWzOwXm6mNic6R+a7ucsbl7VEyD bPmpzqAITXRuBvuxmvzb+HIBnDpn8PSXsN32HbHz4P5nzan/hSoofRsvPjNamr3yAKif kGpQ== X-Gm-Message-State: AOAM531nICU9j3699W80i4C9tmRa72577gyLdMRB5aceeCKIsi5htkYC zhdwaQiOdwK1n1XUb10ZMQ0UMg== X-Received: by 2002:a5d:554c:: with SMTP id g12mr3503212wrw.294.1601650115788; Fri, 02 Oct 2020 07:48:35 -0700 (PDT) Received: from jupiter.home.aloni.org ([77.126.105.230]) by smtp.gmail.com with ESMTPSA id n4sm2001516wrp.61.2020.10.02.07.48.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 07:48:35 -0700 (PDT) From: Dan Aloni To: Chuck Lever Cc: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org Subject: [PATCH] svcrdma: fix bounce buffers for non-zero page offsets Date: Fri, 2 Oct 2020 17:48:27 +0300 Message-Id: <20201002144827.984306-1-dan@kernelim.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org This was discovered using O_DIRECT and small unaligned file offsets at the client side. Fixes: e248aa7be86 ("svcrdma: Remove max_sge check at connect time") Signed-off-by: Dan Aloni --- net/sunrpc/xprtrdma/svc_rdma_sendto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c index 7b94d971feb3..c991eb1fd4e3 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c @@ -638,7 +638,7 @@ static int svc_rdma_pull_up_reply_msg(struct svcxprt_rdma *rdma, while (remaining) { len = min_t(u32, PAGE_SIZE - pageoff, remaining); - memcpy(dst, page_address(*ppages), len); + memcpy(dst, page_address(*ppages) + pageoff, len); remaining -= len; dst += len; pageoff = 0; -- 2.26.2