David Howells <dhowells@xxxxxxxxxx> writes: > Paulo Alcantara <pc@xxxxxxxxxxxxx> wrote: > >> (2) There's a wrong assumption in the API that @netfs_request_pool and >> @netfs_subrequest_pool will always be initialized. For example, we >> should return an error from netfs_alloc_[sub]rquest() functions in case >> @mempool == NULL. > > No. The assumption is correct. The problem is that if the module is built in > (ie. CONFIG_NETFS_SUPPORT=y), then there is no consequence of netfs_init() > failing - and fail it does if CONFIG_PROC_FS=n - and 9p, afs and cifs will > call into it anyway, despite the fact it deinitialised itself. > > It should marked be module_init(), not fs_initcall(). Makes sense, thanks. I tried to reproduce it with cifs.ko and it didn't oops as netfslib ended up not using the default memory pools as cifs.ko already provide its own memory pools via netfs_request_ops.