I'm still not _quite_ sure about that "always", but I'm not sure how much of this is NFS specific. (What happens if you do "mount -o remount,rw" from a different network context...) This is the realm of follow-up patches, but I still have to care to make it reliable.
And there are eight more instances of init_net in net/sunrpc (and three false positives), and I'm still laboriously grinding my way through that crap to figure out what context each one is called in and where it should be getting its data from. But I don't think any of those are actually the problem I'm seeing, I think the problem is that it's matching cached RPC entries by address without also comparing network namespace.
Oh, my CIFS patch wasn't actually an init_net instance replacement, it was fixing the implicit init_net buried inside the sock_create_kern() function. I've been asked for a follow-up patch there to make kerberos work, but haven't got a kerberos test environment set up yet, and have yet to find where the darn kerberos code _is_. Probably the CIFS_UPCALL stuff... which is spawning a userspace /sbin/request-key binary as a child of the host's PID 1... And in the DNS resolver:
saved_cred = override_creds(dns_resolver_cache); rkey = request_key(&key_type_dns_resolver, desc, options); revert_creds(saved_cred);
Yeah, that's not going to work... where is override_creds() defined?
The war continues...
determined