Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp652435ybh; Sat, 3 Aug 2019 07:03:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwGuSw45tTrzfyQcU5F1x/NtfADeWHQm3CTULrLPA21kcWoZi/ZJ8FyiQ9U9o0TQ+ObyXsR X-Received: by 2002:a17:90a:30cf:: with SMTP id h73mr9602535pjb.42.1564841015243; Sat, 03 Aug 2019 07:03:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564841015; cv=none; d=google.com; s=arc-20160816; b=zanfcVjrcjr/2EhVHImdrtqCPrZp0GvsDeHm78EAxJ1uwWTpnt44PHOEl28WtzXeNK FxYBOc2tYjWNED2csNAW6Zo1OMBhxA1FMgom8MTmPCOPB8Ied45R5F/sX1kE7CkH8Bhf XnCqxGW2n530i6IQhLFlEHHAqpf3gttGaPq0x6nwxqvGpqnT3wJPZOnjSDgj0vjD30N9 0TMZ6yGGltmec6BsrUjcOG28Wq2IMxs0PvIm+d2JybLdIjAhm5p5RHKlUn4R6nSc6rcK caYK60+kPHLvz07mx9cVoR2ClitwAbARDDEyz7QH7amwenvUCyyJ1NyvzL7CiW6MTGTk VMLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version; bh=SBWcS5Zhb8Pnk3cY2/sincdCuiQoo4BAyTOpX9I+CrE=; b=dur1zA2TTFMRLPtSpL8oF2hSqv6IKTsG3j61XafX4GWQOtThgfNi9oUPs6qkcyW1Qv Bbk9bPbFRQ5c+/72+Xx6pZXPGKdmIyCh/dd21f8ipQctBq6MByy/WBaeA/TXJyyKOI+o pN1AkGfSh17P0Oo9pWyqv57qqH6qMl0xlS9Y8A5uX/hvSfDlSWVM3yl1NIxqeHp4VZUc hXDR6CXpafs8y0OAPlXdWTv6nE00TpU/lpox8kMQ7zDqA5VpFtGnQEvhQ0uEuMyFJTyc xwIZRtRWl4gYEbC3zulWWSs0kYyNcd2PavqIYLcduULDArJ/LeqACAi7PpJbqsWhh/c/ a43g== 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 m45si8847600pje.39.2019.08.03.07.03.20; Sat, 03 Aug 2019 07:03:35 -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 S2436576AbfHBN7t convert rfc822-to-8bit (ORCPT + 99 others); Fri, 2 Aug 2019 09:59:49 -0400 Received: from mail.fireflyinternet.com ([109.228.58.192]:64685 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729325AbfHBN7t (ORCPT ); Fri, 2 Aug 2019 09:59:49 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from localhost (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 17818578-1500050 for multiple; Fri, 02 Aug 2019 14:59:46 +0100 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Sergey Senozhatsky From: Chris Wilson In-Reply-To: <20190802134955.GA23032@tigerII.localdomain> Cc: Sergey Senozhatsky , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20190802123956.2450-1-sergey.senozhatsky@gmail.com> <20190802123956.2450-2-sergey.senozhatsky@gmail.com> <156475071634.6598.8668583907388398632@skylake-alporthouse-com> <156475141863.6598.6809215010139776043@skylake-alporthouse-com> <20190802131523.GB466@tigerII.localdomain> <20190802133503.GA18318@tigerII.localdomain> <156475327511.6598.417403815598052974@skylake-alporthouse-com> <20190802134955.GA23032@tigerII.localdomain> Message-ID: <156475438424.6598.9088236553657284521@skylake-alporthouse-com> User-Agent: alot/0.6 Subject: Re: [PATCH 2/2] i915: do not leak module ref counter Date: Fri, 02 Aug 2019 14:59:44 +0100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Sergey Senozhatsky (2019-08-02 14:49:55) > On (08/02/19 14:41), Chris Wilson wrote: > [..] > > struct vfsmount *kern_mount(struct file_system_type *type) > > { > > struct vfsmount *mnt; > > mnt = vfs_kern_mount(type, SB_KERNMOUNT, type->name, NULL); > > if (!IS_ERR(mnt)) { > > /* > > * it is a longterm mount, don't release mnt until > > * we unmount before file sys is unregistered > > */ > > real_mount(mnt)->mnt_ns = MNT_NS_INTERNAL; > > } > > return mnt; > > } > > > > With the exception of fiddling with MNT_NS_INTERNAL, it seems > > amenable for our needs. > > Sorry, not sure I understand. i915 use kern_mount() at the moment. > > Since we still need to put_filesystem(), I'd probably add one more > patch > - export put_filesystem() > > so then we can put_filesystem() in i915. Wonder what would happen > if someone would do > modprobe i915 > rmmod i916 > In a loop. > > So something like this (this is against current patch set). Yes, that's what I in mind. I was thinking of whether we can replace our kern_mount + fc->ops->reconfigure() into a single vfs_kern_mount(), and whether or not that works with get_fs_type("tmpfs"). -Chris