On Sat, Oct 06, 2018 at 03:12:24PM -0600, Anton Lindqvist wrote: > CVSROOT: /cvs > Module name: src > Changes by: an...@cvs.openbsd.org 2018/10/06 15:12:23 > > Modified files: > sys/kern : vfs_lockf.c > > Log message: > When freeing a lockf struct that already is part of a linked list, make sure > to > update the next pointer for the preceding lock. Prevents a double free panic. > > ok millert@
This commit broke regress/sys/kern/flock, test t-14. When run in a loop, it fails after a while. Backout makes the test stable. Test 14 uses flock to lock parts of a file. As I understand the test, child 13 holds a read lock for position 101, and has read 0 with that. After a while it reads again, but child 19 has written to it with a write lock. .../flock$ while make t-14; do :; done ./flock /tmp 14 ./flock /tmp 14 ./flock /tmp 14 ./flock /tmp 14 ./flock /tmp 14 ./flock /tmp 14 ./flock /tmp 14 ./flock /tmp 14 ./flock /tmp 14 ./flock /tmp 14 ./flock /tmp 14 ./flock /tmp 14 13: byte 101 expected 0, got 19 *** Error 1 in /usr/src/regress/sys/kern/flock (Makefile:14 't-14') bluhm