Re: [GIT PULL] proc fixes v2 for v5.8-rc1

From: Linus Torvalds
Date: Fri Jun 12 2020 - 15:46:48 EST


On Fri, Jun 12, 2020 at 12:34 PM Eric W. Biederman
<ebiederm@xxxxxxxxxxxx> wrote:
>
> ebiederm@xxxxxxxxxxxx (Eric W. Biederman) writes:

What happened to that first version of the email? I never got it..

> Looking at the code the fsnotify watch should have been removed by
> fsnotify_sb_delete in generic_shutdown_super.

Hmm. Correct. The new_inode_pseudo() is for things that don't have
quotas, fsnotify or writeback.

That was used somewhat intentionally on /proc, though. /proc certainly
doesn't have quotas or writeback.

And fsnotify on /proc seems a bit questionably too. Do people actually
_do_ this and depend on it, or is this just about syzbot doing
something odd and thus showing the problem?

Anyway, I have pulled your fix, because I think it's reasonable and
safe, but I do wonder if we should have kept the new_inode_pseudo(),
and instead just make fsnotify say "you can't notify on an inode that
isn't on the superblock list". Hmm?

Is fsnotify on /proc really sensible? Do we actually generate any
useful notifications?

Linus