Skip to content

Commit

Permalink
dm mpath: verify __pg_init_all_paths locking assumptions at runtime
Browse files Browse the repository at this point in the history
Verify at runtime that __pg_init_all_paths() is called with
multipath.lock held if lockdep is enabled.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Bart Van Assche authored and Mike Snitzer committed Apr 27, 2017
1 parent 1ea0654 commit b194679
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/md/dm-mpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ static int __pg_init_all_paths(struct multipath *m)
struct pgpath *pgpath;
unsigned long pg_init_delay = 0;

lockdep_assert_held(&m->lock);

if (atomic_read(&m->pg_init_in_progress) || test_bit(MPATHF_PG_INIT_DISABLED, &m->flags))
return 0;

Expand Down

0 comments on commit b194679

Please sign in to comment.