From patchwork Mon Feb 29 09:33:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8450791 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A878EC0553 for ; Mon, 29 Feb 2016 09:36:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A2B742022A for ; Mon, 29 Feb 2016 09:36:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C4B02201ED for ; Mon, 29 Feb 2016 09:36:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751737AbcB2JgR (ORCPT ); Mon, 29 Feb 2016 04:36:17 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:60376 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751093AbcB2JgQ (ORCPT ); Mon, 29 Feb 2016 04:36:16 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0MVqHM-1aPQ911kme-00X7iX; Mon, 29 Feb 2016 10:34:15 +0100 From: Arnd Bergmann To: Joonsoo Kim , linux-mm@kvack.org, Herbert Xu Cc: linux-arm-kernel@lists.infradead.org, Michal Nazarewicz , Steven Rostedt , Andrew Morton , Arnd Bergmann , Dan Williams , "David S. Miller" , NeilBrown , Markus Stockhausen , Vinod Koul , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto/async_pq: use __free_page() instead of put_page() Date: Mon, 29 Feb 2016 10:33:58 +0100 Message-Id: <1456738445-876239-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:pxSK8yWDWtvqL/g+51OBY9+e5BtO1K7HlMsPFMr8itN9PgA+67W G8FfeXbIT5Pg6eulliqvb1yw1r/JlALRc47gCioVcNHadUOI3Xywgk4nWUAtaOPvY0LJF5k J0yOzW26ckRFqyaajjLN6jdty0N1NJldlW9asYEoW5s1OwHlf76I3qBKea/vACdWpI0VtuT wiFBLZPZKdk08t3E3prQw== X-UI-Out-Filterresults: notjunk:1; V01:K0:OjzeZHK2S4Q=:YZDcQx1qas0HXk7keD5KMe FbkdU6QWxNHznactIWYnLk8Dnf83waZbfFrqN8ys4oHOt9xhHJgwuI7v9hsALpfwjyhxJMwC6 u9GTrL5Ep3VaEVi9tcTvM+w6JzqhAQcrD893Hw6uJUsRDWymS8fIw+tsXGyIaLgHzvyuz1Cjl HlHZRk9Rs7eAUZB3dzwflXYQcKfOAXRD2gSlWD3SJLW+D20HoNDz9BmWxaohZSKcYsBIYhw/n 9xYWOMbBlfF7Q1xbe5Oix5JZQAaFfOZgDWMiTGdDmTdDK42vZKRe2j7W8EbDPnktRPhF3ClST WKRhxcuzDbSB0BPGsywOXco7gFF6DTrZ0eICWt5oxLU9G23bd+JM//lBHI8YzIp08QKWzm3o5 vL76qHt+RWpas5g1sp3bVJwTa9D4s3gw3UZTrr9MbS8I9tzm8L1q4A5LArdwIEVuTnIgqqxFP ipsNO8p5Vcw1PL5fdqCAcWgPAAKY8ViN8tzOyHmt+Lgt47eANexptIp508SK3kJYIMiZYsPae 07hqbm95ZZzY2nUAuKNeVAtOt0r6nYuWQyX6yGPoWidHYu+ixDM13JrwDwVKhLis1jZmzlR+e cnF1JcpuxR/pqXRnKFy2jmZxAicgsukRzCvgKXp+Z4kcnCXvkkxq6xrbPg5FvbJx8tFk3peao nyXPlqz6RCZAhAZXaN43n9Z7b3RxtOIeEi/wreAOB0wkz0dYoB6pDHWPVwCa+qh1V+Ps= Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The addition of tracepoints to the page reference tracking had an unfortunate side-effect in at least one driver that calls put_page from its exit function, resulting in a link error: `.exit.text' referenced in section `__jump_table' of crypto/built-in.o: defined in discarded section `.exit.text' of crypto/built-in.o From a cursory look at that this driver, it seems that it may be doing the wrong thing here anyway, as the page gets allocated using 'alloc_page()', and should be freed using '__free_page()' rather than 'put_page()'. With this patch, I no longer get any other build errors from the page_ref patch, so hopefully we can assume that it's always wrong to call any of those functions from __exit code, and that no other driver does it. Fixes: 0f80830dd044 ("mm/page_ref: add tracepoint to track down page reference manipulation") Signed-off-by: Arnd Bergmann Acked-by: Dan Williams Acked-by: Vlastimil Babka --- crypto/async_tx/async_pq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/async_tx/async_pq.c b/crypto/async_tx/async_pq.c index c0748bbd4c08..08b3ac68952b 100644 --- a/crypto/async_tx/async_pq.c +++ b/crypto/async_tx/async_pq.c @@ -444,7 +444,7 @@ static int __init async_pq_init(void) static void __exit async_pq_exit(void) { - put_page(pq_scribble_page); + __free_page(pq_scribble_page); } module_init(async_pq_init);