Skip to content

Commit

Permalink
percpu: add missing lockdep_assert_held to func pcpu_free_area
Browse files Browse the repository at this point in the history
Add a missing lockdep_assert_held for pcpu_lock to improve consistency
and safety throughout mm/percpu.c.

Signed-off-by: Dennis Zhou <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
  • Loading branch information
dennisszhou authored and htejun committed Jun 20, 2017
1 parent 1328710 commit 5ccd30e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mm/percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,8 @@ static void pcpu_free_area(struct pcpu_chunk *chunk, int freeme,
int to_free = 0;
int *p;

lockdep_assert_held(&pcpu_lock);

freeme |= 1; /* we are searching for <given offset, in use> pair */

i = 0;
Expand Down

0 comments on commit 5ccd30e

Please sign in to comment.