Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
kmod.c File Reference
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/syscalls.h>
#include <linux/unistd.h>
#include <linux/kmod.h>
#include <linux/slab.h>
#include <linux/completion.h>
#include <linux/cred.h>
#include <linux/file.h>
#include <linux/fdtable.h>
#include <linux/workqueue.h>
#include <linux/security.h>
#include <linux/mount.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/resource.h>
#include <linux/notifier.h>
#include <linux/suspend.h>
#include <linux/rwsem.h>
#include <linux/ptrace.h>
#include <asm/uaccess.h>
#include <trace/events/module.h>

Go to the source code of this file.

Macros

#define CAP_BSET   (void *)1
 
#define CAP_PI   (void *)2
 
#define RUNNING_HELPERS_TIMEOUT   (5 * HZ)
 

Functions

int usermodehelper_read_trylock (void)
 
 EXPORT_SYMBOL_GPL (usermodehelper_read_trylock)
 
long usermodehelper_read_lock_wait (long timeout)
 
 EXPORT_SYMBOL_GPL (usermodehelper_read_lock_wait)
 
void usermodehelper_read_unlock (void)
 
 EXPORT_SYMBOL_GPL (usermodehelper_read_unlock)
 
void __usermodehelper_set_disable_depth (enum umh_disable_depth depth)
 
int __usermodehelper_disable (enum umh_disable_depth depth)
 
int call_usermodehelper_fns (char *path, char **argv, char **envp, int wait, int(*init)(struct subprocess_info *info, struct cred *new), void(*cleanup)(struct subprocess_info *), void *data)
 
 EXPORT_SYMBOL (call_usermodehelper_fns)
 
void __init usermodehelper_init (void)
 

Variables

int max_threads
 
struct ctl_table usermodehelper_table []
 

Macro Definition Documentation

#define CAP_BSET   (void *)1

Definition at line 56 of file kmod.c.

#define CAP_PI   (void *)2

Definition at line 57 of file kmod.c.

#define RUNNING_HELPERS_TIMEOUT   (5 * HZ)

Definition at line 365 of file kmod.c.

Function Documentation

int __usermodehelper_disable ( enum umh_disable_depth  depth)

__usermodehelper_disable - Prevent new helpers from being started. : New value to assign to usermodehelper_disabled.

Set usermodehelper_disabled to and wait for running helpers to exit.

Definition at line 451 of file kmod.c.

void __usermodehelper_set_disable_depth ( enum umh_disable_depth  depth)

__usermodehelper_set_disable_depth - Modify usermodehelper_disabled. : New value to assign to usermodehelper_disabled.

Change the value of usermodehelper_disabled (under umhelper_sem locked for writing) and wakeup tasks waiting for it to change.

Definition at line 437 of file kmod.c.

int call_usermodehelper_fns ( char path,
char **  argv,
char **  envp,
int  wait,
int(*)(struct subprocess_info *info, struct cred *new)  init,
void(*)(struct subprocess_info *)  cleanup,
void data 
)

Definition at line 616 of file kmod.c.

EXPORT_SYMBOL ( call_usermodehelper_fns  )
EXPORT_SYMBOL_GPL ( usermodehelper_read_trylock  )
EXPORT_SYMBOL_GPL ( usermodehelper_read_lock_wait  )
EXPORT_SYMBOL_GPL ( usermodehelper_read_unlock  )
void __init usermodehelper_init ( void  )

Definition at line 713 of file kmod.c.

long usermodehelper_read_lock_wait ( long  timeout)

Definition at line 397 of file kmod.c.

int usermodehelper_read_trylock ( void  )

Definition at line 367 of file kmod.c.

void usermodehelper_read_unlock ( void  )

Definition at line 424 of file kmod.c.

Variable Documentation

int max_threads

Definition at line 92 of file fork.c.

struct ctl_table usermodehelper_table[]
Initial value:
= {
{
.procname = "bset",
.data = CAP_BSET,
.maxlen = _KERNEL_CAPABILITY_U32S * sizeof(unsigned long),
.mode = 0600,
.proc_handler = proc_cap_handler,
},
{
.procname = "inheritable",
.data = CAP_PI,
.maxlen = _KERNEL_CAPABILITY_U32S * sizeof(unsigned long),
.mode = 0600,
.proc_handler = proc_cap_handler,
},
{ }
}

Definition at line 695 of file kmod.c.