Re: panic excl->shared for an AF_LOCAL socket

From: Rick Macklem <rmacklem_at_uoguelph.ca>
Date: Wed, 22 Aug 2018 00:01:57 +0000
Matthew Macy wrote:
[stuff snipped]
>I don't know what's special in this case, but I did revamp the locking there several >months back so I'll take a look next weekend.

Thanks but don't worry about it for now. I think I figured out how the panic()
occurred. If the nfsd was accessing /var/run/nfsuserd.sock for a client and then
tried to soconnect() to it to do the upcall, the nfsd thread would already have
/var/run/nfsuserd.sock vnode locked.

The old way (and what FreeBSD-11 still does) was to use a UDP socket, which
isn't in the file system namespace. (I switched the default to AF_LOCAL so that
nfsuserd could be used in jails where 127.0.0.1 doesn't work, but I now think
it isn't safe to use an AF_LOCAL socket, since it is in the file system's namespace
and, therefore, can be accessed directly by the NFS code.

I think I'll revert the "switch to AF_LOCAL socket" patch.

Hopefully the reporter can help confirm this "theory", rick
Received on Tue Aug 21 2018 - 22:01:59 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:17 UTC