Skip to content

Commit 6f29502

Browse files
committed
synch: keep track of rwlocks in the dependency graph
Signed-off-by: Josef 'Jeff' Sipek <[email protected]>
1 parent 3dac0cf commit 6f29502

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

synch.c

+3
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ static void verify_rw_destroy(const struct lock_context *where, struct rwlock *l
609609
print_invalid_call("RWDESTROY", where);
610610

611611
check_magic(&l->info, "destroy", where, SYNCH_TYPE_RW);
612+
check_unheld_for_destroy(&l->info, where);
612613

613614
l->info.magic = DESTROYED_MAGIC;
614615
/* keep the synch type set to aid debugging */
@@ -621,6 +622,7 @@ static void verify_rw_lock(const struct lock_context *where, struct rwlock *l,
621622
print_invalid_call("RWLOCK", where);
622623

623624
check_magic(&l->info, "acquire", where, SYNCH_TYPE_RW);
625+
check_unheld_for_lock(&l->info, where);
624626
}
625627

626628
static void verify_rw_unlock(const struct lock_context *where, struct rwlock *l)
@@ -629,6 +631,7 @@ static void verify_rw_unlock(const struct lock_context *where, struct rwlock *l)
629631
print_invalid_call("RWUNLOCK", where);
630632

631633
check_magic(&l->info, "release", where, SYNCH_TYPE_RW);
634+
check_held_for_unlock(&l->info, where);
632635
}
633636

634637
static void verify_cond_init(const struct lock_context *where, struct cond *c)

0 commit comments

Comments
 (0)