Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4666071imd; Tue, 30 Oct 2018 05:46:13 -0700 (PDT) X-Google-Smtp-Source: AJdET5cOM6rkVaLjWArppwiLQp4ttGn1LdROel9Vj9B1zkx08XrP2wqfv0Me9L/XTG9Hz7I35gNS X-Received: by 2002:a63:f501:: with SMTP id w1-v6mr17021696pgh.336.1540903573351; Tue, 30 Oct 2018 05:46:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540903573; cv=none; d=google.com; s=arc-20160816; b=ofkHKbZTP6I5cRxxHvKVEmkLMfXgCr/C2AOPUr6jDYEw/dcrb0HfT/4Emib6qip8Rk mg7H72nTMbRDNs0TxleMN0pN9D0PTGqKEDTXy70q89dVf122tNrF2V8kxsCRKv81lzih iDK3tSeBM4+rrCHEagTO4SP7KDOsfkzOGLudP0lGpFexVOiYcly2toZpsEC7Ke5IjT7o R6GhT0E0fFvCTorq7tmrJN7zt2x0VtCGXCd5lQjEdYreMKYhvnXdQlxfUvLdcYeCoKBE iQwkGzSbvf34kJecx1z7kghdMwC9L4h+xzglpYgzOSP3YVwKYlhMWRPs4l3FPH45Nwya mGGQ== 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:subject:cc:to :mime-version:user-agent:from:date:message-id; bh=s7iG7jqaZypppP5SBVZLZQFyamTgPj/8bCFJgNbjjfo=; b=uFmbvTM7as9T2QpF7LTAYdP6UeFFRVeAa3KQGxl1CXldkEChg/IidqI0/wZ3iMI16r 9HTh6KUOeaPMK1mFtx9Stayxxm22LGzgFCcc5Dvenyuo3d1q8d6SVh6qaaBcXkRYmgke KPCDJikqLlBBTjQpjDVUSNETOAKe190jxh5/iGU18W4OBwglEOA066UY/rkfBh7w+LUW vD4CI0TRLidVjCorQLWImh7pNEVY/6RUi+koPa6UHxv15kiWZe2itakrZ8Js3FKNmRp3 r2eeRMpcqmSLlviCY4KCx002KLhL+P9IhCVwsgADB+72FP/c1pfk0m1foa2H+9g0gfeY uHCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r24-v6si23359419pgv.380.2018.10.30.05.45.57; Tue, 30 Oct 2018 05:46:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727593AbeJ3Viu (ORCPT + 99 others); Tue, 30 Oct 2018 17:38:50 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:57072 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726761AbeJ3Viu (ORCPT ); Tue, 30 Oct 2018 17:38:50 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 0B938BB6E0F88; Tue, 30 Oct 2018 20:45:30 +0800 (CST) Received: from [127.0.0.1] (10.177.29.68) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.408.0; Tue, 30 Oct 2018 20:45:26 +0800 Message-ID: <5BD85266.6000301@huawei.com> Date: Tue, 30 Oct 2018 20:45:26 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: CC: , LKML Subject: [Qestion] Lots of memory leaks when mounting and unmounting nfs client to server continuously. Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.68] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Herbert Recently, I hit a memory leak issue when mounting and unmounting nfs with the way of krb5. The issue happens to the linux-3.10-stable. I find that slab-1024 and slab-512 will take up most of the memory. And it can not be freed. Meanwhile, it result in rpcsec_gss_krb5 can be unregistered as well. nfs-sve1:/home # cat /proc/modules | grep krb5 rpcsec_gss_krb5 31477 239730 - Live 0xffffffffa0334000 auth_rpcgss 59314 3 rpcsec_gss_krb5,nfsd, Live 0xffffffffa0123000 sunrpc 300546 25 rpcsec_gss_krb5,nfsd,auth_rpcgss,nfs_acl,lockd, Live 0xffffffffa013b000 I open the slab-1024 trace by enabling /sys/kernel/slab/:t-0001024/trace and get the following [123420.989831] Call Trace: [123420.989834] [] dump_stack+0x19/0x1b [123420.989837] [] alloc_debug_processing+0xc5/0x118 [123420.989839] [] __slab_alloc+0x400/0x48f [123420.989841] [] ? __crypto_alloc_tfm+0x45/0x170 [123420.989845] [] ? setkey+0x57/0x110 [123420.989847] [] ? kzfree+0x2d/0x30 [123420.989850] [] __kmalloc+0x1c8/0x230 [123420.989852] [] __crypto_alloc_tfm+0x45/0x170 [123420.989854] [] crypto_spawn_tfm+0x45/0x80 [123420.989857] [] ? __kmalloc+0x1f3/0x230 [123420.989859] [] crypto_cbc_init_tfm+0x27/0x40 [123420.989864] [] __crypto_alloc_tfm+0x101/0x170 [123420.989866] [] crypto_alloc_base+0x4c/0xb0 [123420.989869] [] context_v2_alloc_cipher.isra.2+0x2b/0xc0 [rpcsec_gss_krb5] [123420.989871] [] gss_import_sec_context_kerberos+0xbf8/0xf00 [rpcsec_gss_krb5] [123420.989875] [] gss_import_sec_context+0x7d/0xb0 [auth_rpcgss] [123420.989878] [] gss_proxy_save_rsc+0x137/0x1b0 [auth_rpcgss] [123420.989884] [] svcauth_gss_proxy_init+0x147/0x1e4 [auth_rpcgss] [123420.989886] [] ? dequeue_entity+0x106/0x520 [123420.989890] [] svcauth_gss_accept+0x3da/0xb70 [auth_rpcgss] [123420.989892] [] ? check_preempt_curr+0x85/0xa0 [123420.989894] [] ? ttwu_do_wakeup+0x19/0xd0 [123420.989897] [] ? ttwu_do_activate.constprop.86+0x5d/0x70 [123420.989900] [] ? try_to_wake_up+0x162/0x330 [123420.989908] [] svc_authenticate+0xc0/0xe0 [sunrpc] [123420.989914] [] svc_process_common+0x21a/0x6f0 [sunrpc] [123420.989921] [] svc_process+0x103/0x170 [sunrpc] [123420.989928] [] nfsd+0xdf/0x150 [nfsd] [123420.989932] [] ? nfsd_destroy+0x80/0x80 [nfsd] [123420.989934] [] kthread+0xcf/0xe0 [123420.989936] [] ? kthread_create_on_node+0x140/0x140 [123420.989939] [] ret_from_fork+0x58/0x90 [123420.989943] [] ? kthread_create_on_node+0x140/0x140 I am unfamiliar with crypto. I will be appreciated if you could give me some suggestion. Thanks, zhong jiang