Re: general protection fault in kernfs_kill_sb (2)

From: Al Viro
Date: Sun May 13 2018 - 22:47:41 EST

On Sun, May 13, 2018 at 11:19:46AM +0900, Tetsuo Handa wrote:

> This is what I reported at
> .
> We are currently waiting for comments from Al Viro.

1) the damn thing is unusable without javashit. Which gets about
the same reaction as sending something.doc in attachment. Please,
find a less obnoxious way to archive the thing (or to generate
URLs that would work without that garbage).

2) deactivate_locked_super() *WILL* be called when fill_super() fails.
Live with it; it allows to simplify a whole lot of cleanup logics
in various filesystems. Again, we are not going for a model where
->kill_sb() is not called for something returned by sget().
Rationale: rarely exercised paths tend to rot, so anything that increases
the duplication of bits and pieces of normal teardown into failure exits
of foo_fill_super() is a bloody bad idea. If anything, we want to take
a lot of stuff out of ->put_super() instances directly into ->kill_sb()
ones, precisely because ->put_super() is only called for fully set up

3) kernfs needs to be fixed. The rest of the dropped commits were
made redundant by 8e04944f0ea8; this one wasn't. Mea culpa.