On Wed, Jul 18, 2018 at 12:44 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > On Wed, Jul 18, 2018 at 07:07:18PM +0900, Tetsuo Handa wrote: >> syzbot is hitting NULL pointer dereference at process_init_reply() [1]. >> This is because deactivate_locked_super() is called before response for >> initial request is processed. Fix this by protecting process_init_reply() >> using fc->killsb. > > IDGI... why is FUSE_INIT asynchronous in the first place? What's the point > returning a superblock before FUSE_INIT completes, seeing that things like > fuse_get_req() block until that one is over? Very very old story. Basically one of the design decisions was to make usrespace fs initialization be completely serial like this: fd = open("/dev/fuse", ...); mount(..., "fuse", ...); read(fd, request_buf, ...); /* First request is always going to be FUSE_INIT */ write(fd, reply_buf, ...); ... In hindsight it was a bad decision, but we are pretty much stuck with it at this point, at least for backward compatibility with all current fuse userspace code. Thanks, Miklos