Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4804190ybh; Tue, 6 Aug 2019 18:35:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIRuCbbwHL+QKcePfF5AWWsmTkrb6Q7d8GfiJDcd7qUGQ32O649PwzJmHATwXoPobQB2Mg X-Received: by 2002:a17:902:b218:: with SMTP id t24mr1345785plr.213.1565141737025; Tue, 06 Aug 2019 18:35:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565141737; cv=none; d=google.com; s=arc-20160816; b=EXvS/eUy9LMrqcUjybkFE1oKupPTR0aweb8s+maKq0qyNvxKyjpatRTegzDP2bmDeY sZbgWnTm3QnyRECUDe0P5NEuI18UIFaduj+nxl8XMNdBpXNI7a/wS/iacw3ztz+rrnQF QFxuycU0TQdeyrJEof6zd6y4jl/c0yQLbMnFGItI0EYmxxt0sOr7BJtasAhNoNESgPPc x2H56+s7GfyfwCpZiLO2fMNC3bjmI3C7a7om1tGp4blN/V8UhTcv5eTrKViV165wwfv1 CBFVWOHPbitj4dMuRyK4YWl1SKLz5zmDnjxqTd+wKOW6W3NCAd0yavc6RJHaiEjzeCEl EP3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4iYkOl3aeyTERThJenFq1/3UwJx4Onl0nTT+k7YLDaI=; b=XI2b1DhZYuY53fruTqOI6+y/XT+YzuJc7k5cBX/PlPB7e/S0eSwNruysajWF0VStq4 C+BLtY2b2g8JyTFJoFA+IsiBUQQYXc/CFsTUV1p7sS+P9ZibdDZcxhV795HXnAlXU5hh XFgELzWXwjc36t4RkqImlWTkocBVLITnnGxaKGfdpIcj2GJuM1LR+/nrdJjdKaFyPvZ+ O/rNCDNyGzkq/dEdCHpvi39Qygc9jvc8b5xDyOKbiuPB7pQXCcZnT1b9LZrvD1vA7ENv VA5ef+lN/gxN5iEOTj1XpfGoUWaUZY0g6qizKECXubNDxLIeIG9aPbQNbPu96VDF2OxI dKMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="fg/Pfm4b"; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q26si48455267pgm.188.2019.08.06.18.35.10; Tue, 06 Aug 2019 18:35:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="fg/Pfm4b"; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729950AbfHGBel (ORCPT + 99 others); Tue, 6 Aug 2019 21:34:41 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:40669 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729857AbfHGBeh (ORCPT ); Tue, 6 Aug 2019 21:34:37 -0400 Received: by mail-pf1-f194.google.com with SMTP id p184so42492861pfp.7; Tue, 06 Aug 2019 18:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4iYkOl3aeyTERThJenFq1/3UwJx4Onl0nTT+k7YLDaI=; b=fg/Pfm4bbVSmVcCrQT7+5JHEhqSFsHPgOaHWfBPnZWxRApjKfb4cb3kH5stgfnMMig zbelcrPsCI0tI4xwfOZRnckTrTKeUm3wG0kqfTVOMRYMB6MvjyF1Rql1N0HWLaZIzEfM iWdx9yjCpgBpQS5lPDIGFaAFICDzqEqnoV9x5MiP1hBYLTSZ4ogFH5QAAV9Yz6tw/8b2 ZykLmdq9ZFns/SDVctWkjbZ0w3aCcCbjN/JvbQSxSyp41bzHjOAMChIKQXNa4QdCxgL9 jwRKUeEurDeq/o0JqzXeiTfFAPo9oNntq7QpxEmENoOSeaVMGgE1SeT20aw5cXMwj05c mafQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=4iYkOl3aeyTERThJenFq1/3UwJx4Onl0nTT+k7YLDaI=; b=eFTDNWpKikCICVBrGpyyQRndGZAAl6pP0+0y+yoHZoU+WRMEgsewM1HrWvj99rgSLc eh3PIIbl+nhYVnJQG3/Da2u1PA8augnDxAxe54s1mkICRe2PiVPjHfKXgUys9BBLDIj1 g2F/RC0Q9JSpepsqB1yKvf6zjshb6rJyGgejK4dYWO+fJ+QG0Vx1hNCVqSjk+KUqrhXn /VYq62/KUd/Y9V2YoxhcvCgPC2ZLWTb3/oCbNW4bEjDRy6a8rL9gHRfVdylYpyGnd6sT HKIKNro40h/edPYaSssFgyixlzHuT4ETT1TXOqP+rxi57W5i6buOQPQ9J0Abh49AyEdz q9pg== X-Gm-Message-State: APjAAAVdQz4VDj5pgLDW8H3UyW8nTYdQWO/NbHwlsMKJSq062ycUPTQW ydEWFS28EPhuKFfVArqJyvM= X-Received: by 2002:a17:90a:de02:: with SMTP id m2mr6000462pjv.18.1565141676262; Tue, 06 Aug 2019 18:34:36 -0700 (PDT) Received: from blueforge.nvidia.com (searspoint.nvidia.com. [216.228.112.21]) by smtp.gmail.com with ESMTPSA id u69sm111740800pgu.77.2019.08.06.18.34.34 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 06 Aug 2019 18:34:35 -0700 (PDT) From: john.hubbard@gmail.com X-Google-Original-From: jhubbard@nvidia.com To: Andrew Morton Cc: Christoph Hellwig , Dan Williams , Dave Chinner , Dave Hansen , Ira Weiny , Jan Kara , Jason Gunthorpe , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , LKML , amd-gfx@lists.freedesktop.org, ceph-devel@vger.kernel.org, devel@driverdev.osuosl.org, devel@lists.orangefs.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-block@vger.kernel.org, linux-crypto@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-media@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-rdma@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-xfs@vger.kernel.org, netdev@vger.kernel.org, rds-devel@oss.oracle.com, sparclinux@vger.kernel.org, x86@kernel.org, xen-devel@lists.xenproject.org, John Hubbard , Herbert Xu , "David S . Miller" Subject: [PATCH v3 32/41] crypt: convert put_page() to put_user_page*() Date: Tue, 6 Aug 2019 18:33:31 -0700 Message-Id: <20190807013340.9706-33-jhubbard@nvidia.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190807013340.9706-1-jhubbard@nvidia.com> References: <20190807013340.9706-1-jhubbard@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public Content-Transfer-Encoding: 8bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: John Hubbard For pages that were retained via get_user_pages*(), release those pages via the new put_user_page*() routines, instead of via put_page() or release_pages(). This is part a tree-wide conversion, as described in commit fc1d8e7cca2d ("mm: introduce put_user_page*(), placeholder versions"). Cc: Herbert Xu Cc: David S. Miller Cc: linux-crypto@vger.kernel.org Signed-off-by: John Hubbard --- crypto/af_alg.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 879cf23f7489..edd358ea64da 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -428,10 +428,7 @@ static void af_alg_link_sg(struct af_alg_sgl *sgl_prev, void af_alg_free_sg(struct af_alg_sgl *sgl) { - int i; - - for (i = 0; i < sgl->npages; i++) - put_page(sgl->pages[i]); + put_user_pages(sgl->pages, sgl->npages); } EXPORT_SYMBOL_GPL(af_alg_free_sg); @@ -668,7 +665,7 @@ static void af_alg_free_areq_sgls(struct af_alg_async_req *areq) for_each_sg(tsgl, sg, areq->tsgl_entries, i) { if (!sg_page(sg)) continue; - put_page(sg_page(sg)); + put_user_page(sg_page(sg)); } sock_kfree_s(sk, tsgl, areq->tsgl_entries * sizeof(*tsgl)); -- 2.22.0