Commit fc9c45b
arm: adjust_pte() use pte_offset_map_rw_nolock()
In do_adjust_pte(), we may modify the pte entry. The corresponding pmd
entry may have been modified concurrently. Therefore, in order to ensure
the stability if pmd entry, use pte_offset_map_rw_nolock() to replace
pte_offset_map_nolock(), and do pmd_same() check after holding the PTL.
All callers of update_mmu_cache_range() hold the vmf->ptl, so we can
determined whether split PTE locks is being used by doing the following,
just as we do elsewhere in the kernel.
ptl != vmf->ptl
And then we can delete the do_pte_lock() and do_pte_unlock().
Link: https://lkml.kernel.org/r/0eaf6b69aeb2fe35092a633fed12537efe645303.1727332572.git.zhengqi.arch@bytedance.com
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Muchun Song <muchun.song@linux.dev>
Cc: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mike Rapoport (Microsoft) <rppt@kernel.org>
Cc: Peter Xu <peterx@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent c855078 commit fc9c45b
1 file changed
+22
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | 64 | | |
89 | | - | |
| 65 | + | |
90 | 66 | | |
91 | 67 | | |
92 | 68 | | |
93 | 69 | | |
94 | 70 | | |
95 | 71 | | |
96 | 72 | | |
| 73 | + | |
97 | 74 | | |
98 | 75 | | |
99 | 76 | | |
| |||
112 | 89 | | |
113 | 90 | | |
114 | 91 | | |
| 92 | + | |
115 | 93 | | |
116 | 94 | | |
117 | 95 | | |
118 | 96 | | |
119 | 97 | | |
120 | | - | |
| 98 | + | |
121 | 99 | | |
122 | 100 | | |
123 | 101 | | |
124 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
125 | 114 | | |
126 | 115 | | |
127 | 116 | | |
128 | | - | |
| 117 | + | |
| 118 | + | |
129 | 119 | | |
130 | 120 | | |
131 | 121 | | |
132 | 122 | | |
133 | 123 | | |
134 | 124 | | |
135 | 125 | | |
136 | | - | |
| 126 | + | |
| 127 | + | |
137 | 128 | | |
138 | 129 | | |
139 | 130 | | |
| |||
160 | 151 | | |
161 | 152 | | |
162 | 153 | | |
163 | | - | |
| 154 | + | |
164 | 155 | | |
165 | 156 | | |
166 | 157 | | |
| |||
203 | 194 | | |
204 | 195 | | |
205 | 196 | | |
206 | | - | |
| 197 | + | |
207 | 198 | | |
208 | 199 | | |
209 | 200 | | |
| |||
0 commit comments