Commit 9a4b9708f1f2eaf5edd619df578cf3afec36eb82

Authored by Matti Linnanvuori
Committed by Rusty Russell
1 parent 74b2553f1d

module: fix and elaborate comments

Fix and elaborate comments.

Signed-off-by: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Showing 1 changed file with 5 additions and 3 deletions Side-by-side Diff

... ... @@ -81,7 +81,8 @@
81 81 }
82 82 EXPORT_SYMBOL(unregister_module_notifier);
83 83  
84   -/* We require a truly strong try_module_get() */
  84 +/* We require a truly strong try_module_get(): 0 means failure due to
  85 + ongoing or failed initialization etc. */
85 86 static inline int strong_try_module_get(struct module *mod)
86 87 {
87 88 if (mod && mod->state == MODULE_STATE_COMING)
... ... @@ -952,7 +953,8 @@
952 953 ret = __find_symbol(name, &owner, &crc,
953 954 !(mod->taints & TAINT_PROPRIETARY_MODULE));
954 955 if (ret) {
955   - /* use_module can fail due to OOM, or module unloading */
  956 + /* use_module can fail due to OOM,
  957 + or module initialization or unloading */
956 958 if (!check_version(sechdrs, versindex, name, mod, crc) ||
957 959 !use_module(mod, owner))
958 960 ret = 0;
... ... @@ -1369,7 +1371,7 @@
1369 1371 return ret;
1370 1372 }
1371 1373  
1372   -/* Change all symbols so that sh_value encodes the pointer directly. */
  1374 +/* Change all symbols so that st_value encodes the pointer directly. */
1373 1375 static int simplify_symbols(Elf_Shdr *sechdrs,
1374 1376 unsigned int symindex,
1375 1377 const char *strtab,