Re: (no subject)

From: Chris Wright (chrisat_private)
Date: Mon Jan 20 2003 - 14:36:18 PST

  • Next message: Stephen D. Smalley: "Re: [RFC][PATCH] Add LSM sysctl hook to 2.5.59"

    *   (phanixat_private) wrote:
    >   In the module init function, when some error happens, for example,
    >   kmalloc failed, what shall I return ? I found that when insmod a kernel
    >   module, if the module init function returns -EINVAL, the kernel collapse.
    If the module init function fails and returns -EINVAL, the kernel should
    not fail.  You likely have another problem.  Do you completely unwind
    the initialzation on the failure return path?  For example, if you've
    already registered the security_ops then fail and return, you will have
    bogus data left behind in the security_ops table.  In this case, any
    subsequent call to security_ops would cause trouble.
    In general, you need to give more debugging information to get useful
    help in debugging your problem.  Russell mentioned using UML and gdb,
    there are a couple of kernel level debuggers, and there is always printk
    (a _very_ useful tool).
    Linux Security Modules
    linux-security-module mailing list

    This archive was generated by hypermail 2b30 : Mon Jan 20 2003 - 14:43:19 PST