Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1509136pxx; Fri, 30 Oct 2020 11:38:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdAfiPr1c99Zjqi0vujMbxKBERdIGgxQMU5+1+Amu+k3LPv0T9o9BkJjZTVeNdeJ6ORYzc X-Received: by 2002:a17:906:1a57:: with SMTP id j23mr3997454ejf.291.1604083137856; Fri, 30 Oct 2020 11:38:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604083137; cv=none; d=google.com; s=arc-20160816; b=RVYL4cXeQJG2b+Ar9rJNTLYLmEd77VKqmuohUwfgsoxD9oVAfxbpU7rLeIl+5h8aeK kAbdBH2d4iz94gIvMxgbrgsVumwoBBU2zySIUxjLKktFmi7qd0KCgFeSgPvX4qMlH5KV fsraTfexiY3QwRIu/9jP5IkUgjKfTu8sdfoBApIVKw0N2G3GUptiYIJAHQYMYhdPT0fT BbT4OFTr4qdGEdmdiyePigp9lDHrJe+rykO9+NdrPVMFCknOJ067JUyf5zfajd9/l6jR gW/jt5bSjpDAWkp7caJkqIx1Y0RrZyyJAbU/he111QKf7Ja6UqYNqvj0SA55lyGcfy7V 44qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=w8bwdQhnTv+3/BVly6z/YvkLM4clxF41vV85qzc+R1Q=; b=Kq8z49sEfURpuiYjvc6RElwOqw7M2HQikRUmu0BWrNcS8GcAtBr0fmnkgcOLWeC16t y739ao0etAUCZ89KjrZECa214rSow/GLhvR0aPXOwuTMQ89oMqWwBQwdLCn6QCFIw/EE JrUOz5DmzufBoNFJAmyM7YKXfE2qKQB4j0BFckvffMXGHRqj4G5gsVfbTCRZUNv8xyXc lSiuAKePasrJayRsZxoz7zdWyfepvXcObaNDaP7FaxITS2c6Eey467m3WRHcsqjwvstz a5B5r3KPoOF1SQD138qfJdJLB2YIA9pzx6j08fJkQD29oe1y7Cj1jFN0NCE9Eqek3PU8 2CZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o6si7520764edi.562.2020.10.30.11.38.34; Fri, 30 Oct 2020 11:38:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727272AbgJ3ShD (ORCPT + 99 others); Fri, 30 Oct 2020 14:37:03 -0400 Received: from mga12.intel.com ([192.55.52.136]:34119 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726061AbgJ3ShD (ORCPT ); Fri, 30 Oct 2020 14:37:03 -0400 IronPort-SDR: K8z57+LgseWV2W7+cG4PCiHXgZ1DGDmnNTFz/oha5v2qeVFyjvG6JSd140k38ABT2FFy0aEYIz xpmr0Ifl+wZw== X-IronPort-AV: E=McAfee;i="6000,8403,9790"; a="147935132" X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="147935132" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2020 11:37:03 -0700 IronPort-SDR: RZeC37+x+MPof7qd/k5rlin+J81mHWeVHdF8jV41CdjtQ9f/8gndhSl50pBA257UsIlchEEQ9p V+7OOuMZUDwg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="351956596" Received: from xshen14-linux.bj.intel.com ([10.238.155.105]) by fmsmga004.fm.intel.com with ESMTP; 30 Oct 2020 11:37:00 -0700 From: Xiaochen Shen To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, tony.luck@intel.com, fenghua.yu@intel.com, reinette.chatre@intel.com, willemb@google.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, pei.p.jia@intel.com, xiaochen.shen@intel.com Subject: [PATCH 0/3] Fix kernfs node reference count leak issues Date: Sat, 31 Oct 2020 03:02:10 +0800 Message-Id: <1604084530-31048-1-git-send-email-xiaochen.shen@intel.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix several kernfs node reference count leak issues: (1) Remove superfluous kernfs_get() calls to prevent refcount leak (2) Add necessary kernfs_put() calls to prevent refcount leak (3) Follow-up cleanup for the change in previous patch. Xiaochen Shen (3): x86/resctrl: Remove superfluous kernfs_get() calls to prevent refcount leak x86/resctrl: Add necessary kernfs_put() calls to prevent refcount leak x86/resctrl: Clean up unused function parameter in rmdir path arch/x86/kernel/cpu/resctrl/rdtgroup.c | 82 ++++++++++++++-------------------- 1 file changed, 33 insertions(+), 49 deletions(-) -- 1.8.3.1