HomeFreeBSD

Fix a slow leak of session structures in the NFSv4.1 server.

Description

Fix a slow leak of session structures in the NFSv4.1 server.

For a fairly rare case of a client doing an ExchangeID after a hard reboot,
the old confirmed clientid still exists, but some clients use a new
co_verifier. For this case, the server was not freeing up the sessions on
the old confirmed clientid.
This patch fixes this case. It also adds two LIST_INIT() macros, which are
actually no-ops, since the structure is malloc()d with M_ZERO so the pointer
is already set to NULL.
It should have minimal impact, since the only way I could exercise this
code path was by doing a hard power cycle (pulling the plus) on a machine
running Linux with a NFSv4.1 mount on the server.
Originally spotted during testing of the ESXi 6.5 client.

Tested by: andreas.nagy@frequentis.com
MFC after: 2 months

Details

Provenance
rmacklemAuthored on
Parents
rS333579: The NFSv4.1 server should return NFSERR_BACKCHANBUSY instead of NFS_OK.
Branches
Unknown
Tags
Unknown