Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2326634imm; Sun, 7 Oct 2018 01:32:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV63G/GwEVfvUMLuGCUxZCInsnbNk9ibLG24x4JenJA5Hrj+ga8ey9LCLMhW5IXqvBSQnxX/J X-Received: by 2002:a63:3203:: with SMTP id y3-v6mr2944877pgy.101.1538901151156; Sun, 07 Oct 2018 01:32:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538901151; cv=none; d=google.com; s=arc-20160816; b=Jgw4HZctXzvKKtnGoVVVqugrDrLl/kCVzLiLRD4NL2PEyz6p3R1lo0TSkwG6SALDkW PNnPo46jYUz3RPmgP9Jx1ZGGeyFrFaMJxWlL0X0FqFsMjfqRl2ZauNnfjcGHrRjfvBS3 6am9gIVspXJKFPbutX5jWEM2n3Vc8D/4gSYoYnhxv5itd1jFWUtbObZeFLs1r2wgudfq QI8RIituwyWTo9HqyytpecFq6ats7IHu+TJ2+ClhPSET333im3ADRyVh/rdKke4+PFUm nb7ZpoBJQFEnaJxADY3VPPNThJq52CKhhxFHXN4R9ztvp5SliRERtLWa297fOLuADU8S audQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=b6Zx/KHHrb/5RuRJso9gBtq0Yt/ZZJb1qviE9X8VJk4=; b=JrKDXOABb/dCUIJ11ntgVr8Fxn121+ZKSdznvmDRI/NFI7bKug/HRE0tInKj8qgW+B 7rhLX3dfDWric77FTXA1FWBB8TnQurq7TpzHTMHqhwLe4kEird6RCBw+briR/dVXl0B3 4Y37Q1WSyhBWChF/3+dfxB8rrG+G8iFKyQPVwgKoc8x68fVtexH1Dj2GALfCyY6oSkkm QeBP/tt+NGWl09p1bgNbuV9I60d7zKyE/AVL+ozzlzSFTDPaZob/DMx5c6uG5D1+1hEg HcfdRI64+uTVjCTSilN0LM7f0joD2ApR7AvwzXRr78+A0Ob4bOEBFQyyBdlT9Vp17RcZ 1nMA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h4-v6si13464663pgj.507.2018.10.07.01.32.11; Sun, 07 Oct 2018 01:32:31 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727103AbeJGPih (ORCPT + 99 others); Sun, 7 Oct 2018 11:38:37 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:47932 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726402AbeJGPih (ORCPT ); Sun, 7 Oct 2018 11:38:37 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w978TLdL062845 for ; Sun, 7 Oct 2018 04:32:05 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2myah3yp64-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 07 Oct 2018 04:32:04 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 7 Oct 2018 09:32:03 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Sun, 7 Oct 2018 09:32:00 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w978VxB966977954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 7 Oct 2018 08:31:59 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 99AECAE045; Sun, 7 Oct 2018 11:30:46 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 06BBFAE04D; Sun, 7 Oct 2018 11:30:45 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.161]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Sun, 7 Oct 2018 11:30:44 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Sun, 07 Oct 2018 11:31:56 +0300 From: Mike Rapoport To: Dennis Zhou Cc: Tejun Heo , Christoph Lameter , Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport , stable@vger.kernel.org Subject: [PATCH] percpu: stop leaking bitmap metadata blocks Date: Sun, 7 Oct 2018 11:31:51 +0300 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 18100708-0008-0000-0000-0000027C0E21 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18100708-0009-0000-0000-000021E53EB9 Message-Id: <1538901111-22823-1-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-07_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810070089 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The commit ca460b3c9627 ("percpu: introduce bitmap metadata blocks") introduced bitmap metadata blocks. These metadata blocks are allocated whenever a new chunk is created, but they are never freed. Fix it. Fixes: ca460b3c9627 ("percpu: introduce bitmap metadata blocks") Signed-off-by: Mike Rapoport Cc: stable@vger.kernel.org --- mm/percpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/percpu.c b/mm/percpu.c index d21cb13..25104cd 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -1212,6 +1212,7 @@ static void pcpu_free_chunk(struct pcpu_chunk *chunk) { if (!chunk) return; + pcpu_mem_free(chunk->md_blocks); pcpu_mem_free(chunk->bound_map); pcpu_mem_free(chunk->alloc_map); pcpu_mem_free(chunk); -- 2.7.4