Commit 039de46
module: Use proper RCU assignment in add_kallsyms().
add_kallsyms() assigns the RCU pointer module::kallsyms and setups the
structures behind it which point to init-data. The module was not
published yet, nothing can see the kallsyms pointer and the data behind
it. Also module's init function was not yet invoked.
There is no need to use rcu_dereference() here, it is just to keep
checkers quiet. The whole RCU read section is also not needed.
Use a local kallsyms pointer and setup the data structures. Assign that
pointer to the data structure at the end via rcu_assign_pointer().
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Petr Pavlu <[email protected]>1 parent 838e6dd commit 039de46
1 file changed
+14
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
180 | 181 | | |
181 | | - | |
182 | | - | |
183 | | - | |
| 182 | + | |
184 | 183 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 184 | + | |
| 185 | + | |
189 | 186 | | |
190 | | - | |
191 | | - | |
192 | | - | |
| 187 | + | |
| 188 | + | |
193 | 189 | | |
194 | 190 | | |
195 | 191 | | |
| |||
199 | 195 | | |
200 | 196 | | |
201 | 197 | | |
202 | | - | |
203 | | - | |
204 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
205 | 201 | | |
206 | 202 | | |
207 | 203 | | |
208 | 204 | | |
209 | 205 | | |
210 | 206 | | |
211 | | - | |
| 207 | + | |
212 | 208 | | |
213 | 209 | | |
214 | | - | |
215 | | - | |
| 210 | + | |
216 | 211 | | |
217 | 212 | | |
218 | 213 | | |
219 | 214 | | |
220 | 215 | | |
221 | 216 | | |
222 | 217 | | |
223 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
224 | 221 | | |
225 | 222 | | |
226 | 223 | | |
| |||
0 commit comments