kfusd/kfusd.c
static void rdebug_real(char *fmt, ...)
{
	va_list ap;
	int len;
	char *message;

	if (debug_throttle > 100) return;
	debug_throttle++;

	/* I'm kmallocing since you don't really want 1k on the stack. I've
	 * had stack overflow problems before; the kernel stack is quite
	 * small... */
	if ((message = KMALLOC(BUFSIZE, GFP_KERNEL)) == NULL)
		return;

	va_start(ap, fmt);
	len = vsnprintf(message, BUFSIZE - 1, fmt, ap);
	va_end(ap);

	if (len >= BUFSIZE) {
		printk("WARNING: POSSIBLE KERNEL CORRUPTION; MESSAGE TOO LONG\n");
	} else {
		printk("fusd: %.975s\n", message); /* note msgs are truncated at
                      * ~1000 chars to fit inside the 1024 printk
                      * limit imposed by the kernel */
	}

	KFREE(message);
}
/* emit a maximum number of debug
				  messages, else it's possible to take
				  out the machine accidentally if a
				  daemon disappears with open files */
emit a maximum number of debug
messages, else it's possible to take
out the machine accidentally if a
daemon disappears with open files
emit a maximum number of debug messages else it ' s possible to take out the machine accidentally if a daemon disappears with open files
static void rdebug_real(char *fmt, ...)
{
	va_list ap;
	int len;
	char *message;
	if (debug_throttle > 100) return;
	debug_throttle++;
	if ((message = KMALLOC(BUFSIZE, GFP_KERNEL)) == NULL)
		return;
	va_start(ap, fmt);
	len = vsnprintf(message, BUFSIZE - 1, fmt, ap);
	va_end(ap);
	if (len >= BUFSIZE) {
		printk("WARNING: POSSIBLE KERNEL CORRUPTION; MESSAGE TOO LONG\n");
	} else {
		printk("fusd: %.975s\n", message); 
	}
	KFREE(message);
}
static void rdebug_real ( char * fmt , ... ) { va_list ap ; int len ; char * message ; if ( debug_throttle > 100 ) return ; debug_throttle ++ ; if ( ( message = KMALLOC ( BUFSIZE , GFP_KERNEL ) ) == NULL ) return ; va_start ( ap , fmt ) ; len = vsnprintf ( message , BUFSIZE - 1 , fmt , ap ) ; va_end ( ap ) ; if ( len >= BUFSIZE ) { printk ( " \n " ) ; } else { printk ( " \n " , message ) ; } KFREE ( message ) ; }
emit a maximum number of debug
messages, else it's possible to take
out the machine accidentally if a
daemon disappears with open files
emit a maximum number of debug messages else it ' s possible to take out the machine accidentally if a daemon disappears with open files
/* I'm kmallocing since you don't really want 1k on the stack. I've
	 * had stack overflow problems before; the kernel stack is quite
	 * small... */ /* note msgs are truncated at
                      * ~1000 chars to fit inside the 1024 printk
                      * limit imposed by the kernel */