1
0
Fork 0
alistair23-linux/drivers/tty/vt
Waiman Long 7edd7e82b9 console: Move userspace I/O out of console_lock to fix lockdep warning
When running certain workload on a debug kernel with lockdep turned on,
a ppc64 kvm guest could sometimes hit the following lockdep warning:

  [ INFO: possible circular locking dependency detected ]
  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(&mm->mmap_sem);
                                lock(console_lock);
                                lock(&mm->mmap_sem);
   lock(cpu_hotplug.lock);

  *** DEADLOCK ***

Looking at the console code, the console_lock-->mmap_sem scenario will
only happen when reading or writing the console unicode map leading to
a page fault.

To break this circular locking dependency, all the userspace I/O
operations in consolemap.c are now moved outside of the console_lock
critical sections so that the mmap_sem won't be acquired when holding
the console_lock.

Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-29 21:42:40 +01:00
..
.gitignore
Makefile tty: vt/Makefile: set the variables to static 2013-01-15 21:52:24 -08:00
consolemap.c console: Move userspace I/O out of console_lock to fix lockdep warning 2016-11-29 21:42:40 +01:00
cp437.uni
defkeymap.c_shipped
defkeymap.map
keyboard.c vt: fix Scroll Lock LED trigger name 2016-11-16 10:03:52 +01:00
selection.c tty: Replace TTY_THROTTLED bit tests with tty_throttled() 2016-04-30 09:26:55 -07:00
vc_screen.c vc: switch to fixed_size_llseek() 2013-06-29 12:57:30 +04:00
vt.c Merge 4.9-rc3 into tty-next 2016-10-30 06:42:10 -04:00
vt_ioctl.c tty: vt, ignore PIO_UNIMAPCLR param 2016-06-25 09:04:48 -07:00