]> git.baikalelectronics.ru Git - kernel.git/commit
mm/damon/dbgfs: fix missed use of damon_dbgfs_lock
authorSeongJae Park <sj@kernel.org>
Sat, 20 Nov 2021 00:43:52 +0000 (16:43 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 20 Nov 2021 18:35:54 +0000 (10:35 -0800)
commited4141efc3cbf11ab662b2216231d23f537e7578
tree93b109b0e3045af3b997ca7c2b09fcddeab65310
parent18a1c2ab0c6b41e6635daeed0feee0b5d883c2d0
mm/damon/dbgfs: fix missed use of damon_dbgfs_lock

DAMON debugfs is supposed to protect dbgfs_ctxs, dbgfs_nr_ctxs, and
dbgfs_dirs using damon_dbgfs_lock.  However, some of the code is
accessing the variables without the protection.  This fixes it by
protecting all such accesses.

Link: https://lkml.kernel.org/r/20211110145758.16558-3-sj@kernel.org
Fixes: 9e7cd59f2791 ("mm/damon/dbgfs: support multiple contexts")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/damon/dbgfs.c