title: How to use find_module?
body: <p>How to use linux kernel's <code>find_module()</code> function?
  The documentation says "must hold module_mutex".</p>
  
  <ol>
  <li>Does that mean that I should acquire
  a lock in my module code before
  searching for a pointer to another?</li>
  <li>When this mutex is locked by
  non-module kernel code?</li>
  </ol>
  
  <p><strong>Context</strong></p>
  
  <p>I'm debugging a set of kernel modules working together.</p>
  
  <p>Module A call functions of module B. At some point in function C of module A a use count of module B goes invalid. I've <a href="https://stackoverflow.com/questions/3288282/how-to-get-use-count-from-linux-kernel-module">determined</a> that this is not happening in function of module B. I'd like to debug use count of module B from C. To do this I'm going to use <a href="http://lxr.linux.no/linux+*/include/linux/module.h#L415" rel="nofollow noreferrer">find_module()</a> to obtain a pointer to B. </p>