MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/netpfil/pf/pf_ioctl.c | ||
---|---|---|
5058 | Accessing this value without a lock ... may it cause a race condition? |
sys/netpfil/pf/pf_ioctl.c | ||
---|---|---|
5058 | It is a data race, but it is tolerable in this case. Absolute worst which can happen is that the row will be skipped when it should not be. But let's say garbage was read. The acquire fence provided by PF_HASHROW_LOCK below makes the previously read possibly bogus state irrelevant as it is forcibly refreshed. |
sys/netpfil/pf/pf_ioctl.c | ||
---|---|---|
5058 | That said ideally it would use a data structure which is safe to iterate in presence of modification. I have a rough sketch to implement this, so the state as proposed here should be temporary. |