CRED: Add some configurable debugging [try #6]
[linux-2.6-block.git] / kernel / kmod.c
index 385c31a1bdbf3118b3d82d44b6720af727738bcb..4e8cae2e9148153c5055a91d42948e38a685c22f 100644 (file)
@@ -78,6 +78,10 @@ int __request_module(bool wait, const char *fmt, ...)
 #define MAX_KMOD_CONCURRENT 50 /* Completely arbitrary value - KAO */
        static int kmod_loop_msg;
 
+       ret = security_kernel_module_request();
+       if (ret)
+               return ret;
+
        va_start(args, fmt);
        ret = vsnprintf(module_name, MODULE_NAME_LEN, fmt, args);
        va_end(args);
@@ -462,6 +466,7 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info,
        int retval = 0;
 
        BUG_ON(atomic_read(&sub_info->cred->usage) != 1);
+       validate_creds(sub_info->cred);
 
        helper_lock();
        if (sub_info->path[0] == '\0')