title: Get absolute path from a fd of an AF_UNIX socket in kernel module
body: <p>Given a file descriptor, I need to get its absolute path whether it is a regular file or a <code>AF_UNIX</code> socket. The code at <a href="https://stackoverflow.com/questions/8250078/how-can-i-get-a-filename-from-a-file-descriptor-inside-a-kernel-module">How can I get a filename from a file descriptor inside a kernel module?</a> works for regular files but with <code>AF_UNIX</code> sockets I get something like this <code>"socket:[12345]"</code> instead of the absolute path "/tmp/.X11-unix/X0".</p>
  
  <pre><code>struct sockaddr_un {
                      unsigned short   sun_family;    // AF_UNIX
                      char            sun_path[108];  // pathname
                      };
  </code></pre>