* Handle the loading of a new module by populating a module_info for it. This * is called for both preloaded and dynamically loaded modules. */
| 221 | * is called for both preloaded and dynamically loaded modules. |
| 222 | */ |
| 223 | void |
| 224 | unwind_module_loaded(struct linker_file *lf) |
| 225 | { |
| 226 | struct module_info *info; |
| 227 | |
| 228 | /* |
| 229 | * A module that contains only data may have no unwind info; don't |
| 230 | * create any module info for it. |
| 231 | */ |
| 232 | if (lf->exidx_size == 0) |
| 233 | return; |
| 234 | |
| 235 | /* |
| 236 | * Find an unused entry in the existing list to reuse. If we don't find |
| 237 | * one, create a new one and link it into the list. This is the only |
| 238 | * place the module_list is modified. Adding a new entry to the list |
| 239 | * will not perturb any other threads currently walking the list. This |
| 240 | * function is invoked while kern_linker is still holding its lock |
| 241 | * to prevent its module list from being modified, so we don't have to |
| 242 | * worry about racing other threads doing an insert concurrently. |
| 243 | */ |
| 244 | if ((info = find_module_info(0)) == NULL) { |
| 245 | info = create_module_info(); |
| 246 | } |
| 247 | populate_module_info(info, lf); |
| 248 | } |
| 249 | |
| 250 | /* Handle the unloading of a module. */ |
| 251 | void |
no test coverage detected