Re: [PATCH 0/1] devpts: use dynamic_dname() to generate proc name

From: Linus Torvalds
Date: Wed Aug 23 2017 - 21:16:09 EST


On Wed, Aug 23, 2017 at 5:42 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Let me try to think about alteratives. Clearly this is a regression
> and I need to fix it, I just need to figure out _how_.

Ok, sadly, I think it's unfixable with the current model.

We literally used to keep the wrong 'struct path' around, and sadly,
fixing the struct path to point to the right vfsmount fundamentally
means that we'd be keeping the mount count elevated for that pts
mount.

And that fundamentally means that umount() will return -EBUSY. There's
no way around it.

So I think I will have to just revert that fix.

Damn.

Now, I think there's a way forward: get rid of the 'struct path'
(which is bogus anyway), and only remember the pts denty.

Then, at TIOCGPTPEER time (which is why we currently have that 'struct
path' anyway), look up the right 'vfsmount' by looking up the 'pts'
path again.

That's a rather bigger patch than the one I'll have to revert, I'm afraid ;(

Linus