Messages in this thread | | | From | Keith Owens <> | Subject | Re: [PATCH #2] console lock grabbed too early in printk... | Date | Sun, 02 Jul 2000 12:37:53 +1000 |
| |
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/
| |