From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF149FA372C for ; Fri, 8 Nov 2019 16:21:19 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4C3C21882 for ; Fri, 8 Nov 2019 16:21:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4C3C21882 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id DFB3186126; Fri, 8 Nov 2019 16:21:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YVGhjDNxAc3H; Fri, 8 Nov 2019 16:21:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id EAECE860EA; Fri, 8 Nov 2019 16:21:16 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 231811BF370 for ; Fri, 8 Nov 2019 16:21:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1B10A87E6C for ; Fri, 8 Nov 2019 16:21:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p1f-lTCt5e7p for ; Fri, 8 Nov 2019 16:21:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from esa3.microchip.iphmx.com (esa3.microchip.iphmx.com [68.232.153.233]) by hemlock.osuosl.org (Postfix) with ESMTPS id 343AE87E63 for ; Fri, 8 Nov 2019 16:21:14 +0000 (UTC) Received-SPF: Pass (esa3.microchip.iphmx.com: domain of Christian.Gromm@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa3.microchip.iphmx.com; envelope-from="Christian.Gromm@microchip.com"; x-sender="Christian.Gromm@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa3.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa3.microchip.iphmx.com; envelope-from="Christian.Gromm@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa3.microchip.iphmx.com; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=Christian.Gromm@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: BH62hnAHu1QIvC3Og46mI5QH1qTpYChmTZPtu5aJRvkjtebPW0iUe4wZsTYASt6lBKdna4Yuc6 obYSABFJJKij1hOnVRYr4LK4XN2llvn0gWF7xdtTbaiU1kFuVYwpd0Phnmu4Kx+F/lOeKLDn52 lI5K9jWF/+t3k0+0LQeDi1tJBXCYZcjIL/xdL/PWtJMdxd2kCZEaBa4oXFdKzTOIOk/QXxVM0Q O3xlTRk01NOuY7srFMfjhBac9H4a7x8pVZjEq0DQh0ylpuRpx4P/jwHfFlUgKZ2pqORmsShXe8 SBw= X-IronPort-AV: E=Sophos;i="5.68,282,1569308400"; d="scan'208";a="56257993" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 08 Nov 2019 09:21:13 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 8 Nov 2019 09:21:12 -0700 Received: from kar-sv-agl01.mchp-main.com (10.10.85.251) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Fri, 8 Nov 2019 09:21:11 -0700 From: Christian Gromm To: Subject: [PATCH 0/2] staging: most: prevent module removal if configfs directory is populated Date: Fri, 8 Nov 2019 17:21:06 +0100 Message-ID: <1573230068-27658-1-git-send-email-christian.gromm@microchip.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christian Gromm , driverdev-devel@linuxdriverproject.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" Currently the core module does not hold any reference to component modules. Hence, a component could be unloaded from the system anytime. Even if the configuration interface is still being populated with configfs items/groups. User space then has no chance to fix the usage count by calling rmdir on such a config item/group, as the respective directory does not exist anymore. In this situation the core module cannot be unloaded anymore. This patch set fixes this issue by holding a reference as long as the configfs items exist. Christian Gromm (2): staging: most: configfs: move configfs subsystems to container struct staging: most: block module removal while having active configfs items drivers/staging/most/cdev/cdev.c | 1 + drivers/staging/most/configfs.c | 118 +++++++++++++++++++++++++------------ drivers/staging/most/core.h | 1 + drivers/staging/most/net/net.c | 1 + drivers/staging/most/sound/sound.c | 1 + drivers/staging/most/video/video.c | 1 + 6 files changed, 85 insertions(+), 38 deletions(-) -- 2.7.4 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel