Commit d78f385
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: 75c1c2b ("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>1 parent db7a347 commit d78f385
1 file changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
877 | 877 | | |
878 | 878 | | |
879 | 879 | | |
| 880 | + | |
880 | 881 | | |
881 | 882 | | |
882 | 883 | | |
883 | 884 | | |
884 | 885 | | |
885 | 886 | | |
| 887 | + | |
886 | 888 | | |
887 | 889 | | |
888 | 890 | | |
| |||
892 | 894 | | |
893 | 895 | | |
894 | 896 | | |
| 897 | + | |
895 | 898 | | |
896 | 899 | | |
897 | 900 | | |
| |||
944 | 947 | | |
945 | 948 | | |
946 | 949 | | |
947 | | - | |
| 950 | + | |
948 | 951 | | |
| 952 | + | |
949 | 953 | | |
950 | 954 | | |
951 | | - | |
| 955 | + | |
952 | 956 | | |
953 | 957 | | |
954 | 958 | | |
955 | | - | |
| 959 | + | |
956 | 960 | | |
957 | 961 | | |
958 | 962 | | |
| |||
963 | 967 | | |
964 | 968 | | |
965 | 969 | | |
| 970 | + | |
| 971 | + | |
966 | 972 | | |
967 | 973 | | |
968 | 974 | | |
| |||
0 commit comments