[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <156475438424.6598.9088236553657284521@skylake-alporthouse-com>
Date: Fri, 02 Aug 2019 14:59:44 +0100
From: Chris Wilson <chris@...is-wilson.co.uk>
To: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] i915: do not leak module ref counter
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
Powered by blists - more mailing lists