Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
gc.c File Reference
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/security.h>
#include <keys/keyring-type.h>
#include "internal.h"

Go to the source code of this file.

Macros

#define KEY_GC_KEY_EXPIRED   0 /* A key expired and needs unlinking */
 
#define KEY_GC_REAP_KEYTYPE   1 /* A keytype is being unregistered */
 
#define KEY_GC_REAPING_KEYTYPE   2 /* Cleared when keytype reaped */
 
#define KEY_GC_REAP_AGAIN   0x01 /* - Need another cycle */
 
#define KEY_GC_REAPING_LINKS   0x02 /* - We need to reap links */
 
#define KEY_GC_SET_TIMER   0x04 /* - We need to restart the timer */
 
#define KEY_GC_REAPING_DEAD_1   0x10 /* - We need to mark dead keys */
 
#define KEY_GC_REAPING_DEAD_2   0x20 /* - We need to reap dead key links */
 
#define KEY_GC_REAPING_DEAD_3   0x40 /* - We need to reap dead keys */
 
#define KEY_GC_FOUND_DEAD_KEY   0x80 /* - We found at least one dead key */
 

Functions

 DECLARE_WORK (key_gc_work, key_garbage_collector)
 
void key_schedule_gc (time_t gc_at)
 
void key_schedule_gc_links (void)
 
void key_gc_keytype (struct key_type *ktype)
 

Variables

unsigned key_gc_delay = 5 * 60
 
struct key_type key_type_dead
 

Macro Definition Documentation

#define KEY_GC_FOUND_DEAD_KEY   0x80 /* - We found at least one dead key */
#define KEY_GC_KEY_EXPIRED   0 /* A key expired and needs unlinking */

Definition at line 39 of file gc.c.

#define KEY_GC_REAP_AGAIN   0x01 /* - Need another cycle */
#define KEY_GC_REAP_KEYTYPE   1 /* A keytype is being unregistered */

Definition at line 40 of file gc.c.

#define KEY_GC_REAPING_DEAD_1   0x10 /* - We need to mark dead keys */
#define KEY_GC_REAPING_DEAD_2   0x20 /* - We need to reap dead key links */
#define KEY_GC_REAPING_DEAD_3   0x40 /* - We need to reap dead keys */
#define KEY_GC_REAPING_KEYTYPE   2 /* Cleared when keytype reaped */

Definition at line 41 of file gc.c.

#define KEY_GC_REAPING_LINKS   0x02 /* - We need to reap links */
#define KEY_GC_SET_TIMER   0x04 /* - We need to restart the timer */

Function Documentation

DECLARE_WORK ( key_gc_work  ,
key_garbage_collector   
)
void key_gc_keytype ( struct key_type *  ktype)

Definition at line 113 of file gc.c.

void key_schedule_gc ( time_t  gc_at)

Definition at line 56 of file gc.c.

void key_schedule_gc_links ( void  )

Definition at line 77 of file gc.c.

Variable Documentation

unsigned key_gc_delay = 5 * 60

Definition at line 21 of file gc.c.

struct key_type key_type_dead
Initial value:
= {
.name = "dead",
}

Definition at line 48 of file gc.c.