Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/net



Module Name:    src
Committed By:   riastradh
Date:           Tue Sep  8 16:39:58 UTC 2020

Modified Files:
        src/sys/net: if_wg.c

Log Message:
wg: Drop wgp_lock while waiting for endpoint psref to drain.

- This is safe because wgp_endpoint_changing locks out any attempts
  to change the endpoint until the draining is complete.

- This is necessary to avoid a deadlock where the handshake thread
  holds a psref and awaits mutex_enter(wgp->wgp_lock).

XXX The same deadlock may occur in wg_destroy_session.  Not clear
that it's safe to just release wgp_lock there; may need to create a
new session state, say WGS_STATE_DRAINING, while we wait for
psref_target_destroy.  But this needs a little more thought; a new
state may not be necessary, and would be nice to avoid if not
necessary.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/net/if_wg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index