Bug 238212 - [Witness] Errors are reported when taking a recursive lock
Summary: [Witness] Errors are reported when taking a recursive lock
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.2-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2019-05-29 12:04 UTC by Masse Nicolas
Modified: 2019-05-29 12:16 UTC (History)
0 users

See Also:


Attachments
Add a check in witness to allow taking a lock recursively (587 bytes, patch)
2019-05-29 12:04 UTC, Masse Nicolas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Masse Nicolas 2019-05-29 12:04:35 UTC
Created attachment 204696 [details]
Add a check in witness to allow taking a lock recursively

When using a recursive lock, witness trigger an errors if the lock is taken twice although it is an expected case.

This was observed when using a rm_lock created with the RM_RECURSE flag.
So I add a check in witness to check is the class of the lock have the LC_RECURSABLE flag set before triggering the error.

Note that this is a quick fix which could probably be enhanced.