Re: [PATCH #2] console lock grabbed too early in printk...

From: Keith Owens (kaos@ocs.com.au)
Date: Sat Jul 01 2000 - 21:37:53 EST


On Sat, 1 Jul 2000 19:31:12 -0700 (PDT),
Chris Lattner <sabre@skylab.org> wrote:
>Is there a kmalloc flag that you can pass that says not to sleep? I'm not
>too familiar with that area...

GFP_ATOMIC, see Documentation/DocBook/kernel-hacking.tmpl, but then you
have to test for kmalloc failing. What do you do if kmalloc fails?
Drop the message and report that you dropped it. Instead of calling
extra kernel services from what was previously a leaf function, just
report lost messages as a bug.

Anything that complicates printk is a Bad Idea (TM), too many bits of
kernel code assume that printk works under all circumstances.
Detecting and avoiding deadlock is good, calling other kernel functions
from printk is bad.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jul 07 2000 - 21:00:10 EST