Commit 8583840
committed
witness: Record the first acquired file and line for recursable locks
and the last acquired file and line to witness object.
For recursable locks, unfortunately current implementation records only
the recurse count and the last acquired file and line, but does not
restore the previous acquired file and line on unlock. Hence it is
possible to report false acquired file and line, and that may mislead
developers and make the report by users a little harder to analyse.
Since subsequent recurse locks do not affect how witness order check,
record the first acquired file and line so that the logic is much clear.
Reported by: bz
Reviewed by: kib (previous version), markj
See also: https://lists.freebsd.org/archives/freebsd-current/2025-June/007944.html
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D52496
(cherry picked from commit 2d85bc8)
(cherry picked from commit 3dc9f96)
(cherry picked from commit 7838ad8)1 parent b4a079d commit 8583840
1 file changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1512 | 1512 | | |
1513 | 1513 | | |
1514 | 1514 | | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
1515 | 1519 | | |
1516 | 1520 | | |
1517 | 1521 | | |
1518 | 1522 | | |
1519 | 1523 | | |
1520 | 1524 | | |
1521 | 1525 | | |
1522 | | - | |
1523 | | - | |
1524 | 1526 | | |
1525 | 1527 | | |
1526 | 1528 | | |
1527 | | - | |
1528 | | - | |
1529 | | - | |
1530 | | - | |
1531 | 1529 | | |
1532 | 1530 | | |
1533 | 1531 | | |
| |||
0 commit comments