On Mon, Jan 23, 2023 at 12:48:42PM +0100, Jonas Oberhauser wrote:
I'm inclined to add this check to the memory model. Would you prefer to
On 1/21/2023 6:36 PM, Alan Stern wrote:
On Fri, Jan 20, 2023 at 10:41:14PM +0100, Jonas Oberhauser wrote:I currently don't care too much about the incorrect usage of herd (by
On 1/20/2023 5:18 PM, Alan Stern wrote:Yeah, okay. It doesn't hurt to add this check, but the check isn't
On Fri, Jan 20, 2023 at 11:13:00AM +0100, Jonas Oberhauser wrote:Of course, but as you know this is completely orthogonal.
Perhaps we could say that reading an index without using it later isWe already flag locks that don't have a matching unlock.
forbidden?
flag ~empty [Srcu-lock];data;rf;[~ domain(data;[Srcu-unlock])] as
thrown-srcu-cookie-on-floor
complete. For example, it won't catch the invalid usage here:
P0(srcu_struct *ss)
{
int r1, r2;
r1 = srcu_read_lock(ss);
srcu_read_unlock(&ss, r1);
r2 = srcu_read_lock(ss);
srcu_read_unlock(&ss, r2);
}
exists (~0:r1=0:r2)
On the other hand, how often will people make this sort of mistake in
their litmus tests? My guess is not very.
inspecting some final state incorrectly), only incorrect usage in the code.
submit it yourself as a separate patch? Or are you happy to have it
merged with my patch, and if so, do you have a final, preferred form for
the check?