OpenBSD cvs log

created 2018-11-30T05:43:33Z
begin 2018-10-03T00:00:00Z
end 2018-10-04T00:00:00Z
path src/sys
commits 1

date 2018-10-03T01:24:14Z
author visa
files src/sys/net/if_pfsync.c log diff annotate
message Fix a race condition that affects pfsync interface deletion.

When a pfsync interface is being deleted, all its timeout handlers and
pfsync_send_dispatch() have to stop accessing the software context
before the context is freed. Ensure sufficient synchronization by
acquiring NET_LOCK() and clearing `pfsyncif' inside the critical
section in pfsync_clone_destroy(). When a timeout handler has entered
the critical section, it has to check `pfsyncif' and bail out if the
value is NULL. pfsync_send_dispatch() already does this check.

Issue reported and fix tested by Hrvoje Popovski.

OK mpi@ bluhm@