]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
percpu: add missing lockdep_assert_held to func pcpu_free_area
authorDennis Zhou <dennisz@fb.com>
Mon, 19 Jun 2017 23:28:29 +0000 (19:28 -0400)
committerTejun Heo <tj@kernel.org>
Tue, 20 Jun 2017 17:43:38 +0000 (13:43 -0400)
Add a missing lockdep_assert_held for pcpu_lock to improve consistency
and safety throughout mm/percpu.c.

Signed-off-by: Dennis Zhou <dennisz@fb.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
mm/percpu.c

index c03753054099939791f231de46b965f9e3d88a77..be95d3192acba2d962cc086ce0cdaed73d79f46d 100644 (file)
@@ -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;