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

From: Russell King (rmk@arm.linux.org.uk)
Date: Sun Jul 02 2000 - 03:54:14 EST


Chris Lattner writes:
> The sequence of events goes like this:
> 1. printk of args to sys_access
> 2. printk grabs the console lock
> 3. vfprintf is called, but one of the strings (the filename) resides on a
> page that hasn't been materialized yet.
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  This is the real bug.

> 4. page fault occurs
> 5. page fault handler runs, maps page
> 6. Page mapping causes printk
> 7. printk causes deadlock as it attempts to grab the console lock that the
> kernel thread already has...

printk is not broken. Your debug code is.
   _____
  |_____| ------------------------------------------------- ---+---+-
  | | Russell King rmk@arm.linux.org.uk --- ---
  | | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
  | +-+-+ --- -+-
  / | THE developer of ARM Linux |+| /|\
 / | | | --- |
    +-+-+ ------------------------------------------------- /\\\ |

-
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