[Bug 216086] An NFSv4.1 client openowner structure is erroneously free'd when recovery fails

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Jan 14 22:44:17 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216086

            Bug ID: 216086
           Summary: An NFSv4.1 client openowner structure is erroneously
                    free'd when recovery fails
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: rmacklem at FreeBSD.org

Created attachment 178894
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=178894&action=edit
Don't free openowner+opens when a recovery attempt fails

When the NFSv4.1 client attempts recovery from a server crash/reboot and
the new ExchangeID/CreateSession fails 5 times, the code free'd the
openowner structure and cleared the NFSCLFLAGS_HASCLIENTID.

However, it is possible that a process holds the lock on the openowner
at this time and, as such, the openowner should not be free'd.
It also makes sense to keep the opens in case a subsequent recovery
is successful. This scenario would not normally happen, but apparently
does for the AmazonEFS server.

This patch changes the code to not free the openowner + opens and
leave the flag set for the crash/lease_expiry recovery cases.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list