Bug 1466888 - Lenovo T460p trackpoint/touchpad: possible circular locking dependency detected (psmouse_mutex)
Lenovo T460p trackpoint/touchpad: possible circular locking dependency detect...
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-30 12:14 EDT by Jan Pokorný
Modified: 2018-04-06 14:49 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1432481
Environment:
Last Closed: 2018-04-06 14:49:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Pokorný 2017-06-30 12:14:16 EDT
+++ This bug was initially created as a clone of Bug #1432481 +++

This happened to me again with 4.12.0-0.rc6.git3.1.fc27.x86_64,
see the bottom of this initial comment.

--- Additional comment from Jan Pokorný on 2017-04-03 16:05:20 CEST ---

Just for posterity (if it is found relevant in the future), I'll share
a newer finding with 4.11.0-0.rc4.git3.1.fc27.x86_64:

======================================================
[ INFO: possible circular locking dependency detected ]
4.11.0-0.rc4.git3.1.fc27.x86_64 #1 Not tainted
-------------------------------------------------------
kworker/5:1/78 is trying to acquire lock:
 (s_active#92){++++.+}, at: [<ffffffffaf36bfd5>] kernfs_remove_by_name_ns+0x45/0xa0

but task is already holding lock:
 (psmouse_mutex){+.+.+.}, at: [<ffffffffaf75059c>] psmouse_disconnect+0x6c/0x150

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:
[TTM] Zone  kernel: Available graphics memory: 16168954 kiB
[TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[TTM] Initializing pool allocator
[TTM] Initializing DMA pool allocator
nouveau 0000:02:00.0: DRM: VRAM: 2048 MiB
nouveau 0000:02:00.0: DRM: GART: 1048576 MiB
nouveau 0000:02:00.0: DRM: Pointer to TMDS table invalid
nouveau 0000:02:00.0: DRM: DCB version 4.0
nouveau 0000:02:00.0: DRM: Pointer to flat panel table invalid

-> #1 (psmouse_mutex){+.+.+.}:
       lock_acquire+0xb7/0x210
       __mutex_lock+0x83/0x9e0
       mutex_lock_interruptible_nested+0x1b/0x20
       psmouse_attr_set_helper+0x30/0x120
       dev_attr_store+0x18/0x30
       sysfs_kf_write+0x42/0x60
       kernfs_fop_write+0x151/0x1e0
       __vfs_write+0x37/0x160
       vfs_write+0xc3/0x1e0
       SyS_write+0x58/0xc0
       do_syscall_64+0x6c/0x1f0
       return_from_SYSCALL_64+0x0/0x7a

-> #0 (s_active#92){++++.+}:
       __lock_acquire+0x13a5/0x13b0
       lock_acquire+0xb7/0x210
       __kernfs_remove+0x271/0x370
       kernfs_remove_by_name_ns+0x45/0xa0
       remove_files.isra.1+0x35/0x70
       sysfs_remove_group+0x44/0xa0
       trackpoint_disconnect+0x24/0x40
       psmouse_disconnect+0xf7/0x150
       serio_disconnect_driver+0x32/0x40
       serio_driver_remove+0x15/0x20
       device_release_driver_internal+0x160/0x210
       device_release_driver+0x12/0x20
       serio_disconnect_port+0x98/0xb0
       serio_reconnect_subtree+0x51/0xb0
       serio_handle_event+0x17f/0x290
       process_one_work+0x260/0x750
       worker_thread+0x4e/0x4a0
       kthread+0x12c/0x150
       ret_from_fork+0x31/0x40

other info that might help us debug this:
 Possible unsafe locking scenario:
       CPU0                    CPU1
       ----                    ----
  lock(psmouse_mutex);
                               lock(s_active#92);
                               lock(psmouse_mutex);
  lock(s_active#92);

 *** DEADLOCK ***
6 locks held by kworker/5:1/78:
 #0:  ("events_long"){.+.+.+}, at: [<ffffffffaf0d3d7b>] process_one_work+0x1db/0x750
 #1:  (serio_event_work){+.+.+.}, at: [<ffffffffaf0d3d7b>] process_one_work+0x1db/0x750
 #2:  (serio_mutex){+.+.+.}, at: [<ffffffffaf73fd7b>] serio_handle_event+0x2b/0x290
 #3:  (&dev->mutex){......}, at: [<ffffffffaf63c849>] device_release_driver_internal+0x39/0x210
 #4:  (&serio->drv_mutex){+.+.+.}, at: [<ffffffffaf73edf0>] serio_disconnect_driver+0x20/0x40
 #5:  (psmouse_mutex){+.+.+.}, at: [<ffffffffaf75059c>] psmouse_disconnect+0x6c/0x150

stack backtrace:
CPU: 5 PID: 78 Comm: kworker/5:1 Not tainted 4.11.0-0.rc4.git3.1.fc27.x86_64 #1
Hardware name: LENOVO 20FXS0BB14/20FXS0BB14, BIOS R07ET63W (2.03 ) 03/15/2016
Workqueue: events_long serio_handle_event
Call Trace:
 dump_stack+0x8e/0xd1
 print_circular_bug+0x1b6/0x210
 __lock_acquire+0x13a5/0x13b0
 lock_acquire+0xb7/0x210
 ? kernfs_remove_by_name_ns+0x45/0xa0
 __kernfs_remove+0x271/0x370
 ? kernfs_remove_by_name_ns+0x45/0xa0
 ? kernfs_find_ns+0x7e/0x140
 kernfs_remove_by_name_ns+0x45/0xa0
 remove_files.isra.1+0x35/0x70
 sysfs_remove_group+0x44/0xa0
 trackpoint_disconnect+0x24/0x40
 psmouse_disconnect+0xf7/0x150
 serio_disconnect_driver+0x32/0x40
 serio_driver_remove+0x15/0x20
 device_release_driver_internal+0x160/0x210
 device_release_driver+0x12/0x20
 serio_disconnect_port+0x98/0xb0
 serio_reconnect_subtree+0x51/0xb0
 serio_handle_event+0x17f/0x290
 process_one_work+0x260/0x750
 ? process_one_work+0x1db/0x750
 worker_thread+0x4e/0x4a0
 ? process_one_work+0x750/0x750
 kthread+0x12c/0x150
 ? kthread_create_on_node+0x60/0x60
 ret_from_fork+0x31/0x40


* * *


with 4.12.0-0.rc6.git3.1.fc27.x86_64:

Jun 30 11:13:22 betenoire kernel: psmouse serio2: Failed to enable mouse on synaptics-pt/serio0
Jun 30 11:13:22 betenoire kernel: 
Jun 30 11:13:22 betenoire kernel: ======================================================
Jun 30 11:13:22 betenoire kernel: WARNING: possible circular locking dependency detected
Jun 30 11:13:22 betenoire kernel: 4.12.0-0.rc6.git3.1.fc27.x86_64 #1 Not tainted
Jun 30 11:13:22 betenoire kernel: ------------------------------------------------------
Jun 30 11:13:22 betenoire kernel: kworker/0:1/73 is trying to acquire lock:
Jun 30 11:13:22 betenoire kernel:  (s_active#95){++++.+}, at: [<ffffffffb2360f75>] kernfs_remove_by_name_ns+0x45/0x90
Jun 30 11:13:22 betenoire kernel: 
                                  but task is already holding lock:
Jun 30 11:13:22 betenoire kernel:  (psmouse_mutex){+.+.+.}, at: [<ffffffffb274e58c>] psmouse_disconnect+0x6c/0x180
Jun 30 11:13:22 betenoire kernel: 
                                  which lock already depends on the new lock.
Jun 30 11:13:22 betenoire kernel: 
                                  the existing dependency chain (in reverse order) is:
Jun 30 11:13:22 betenoire kernel: 
                                  -> #1 (psmouse_mutex){+.+.+.}:
Jun 30 11:13:22 betenoire kernel:        lock_acquire+0xa3/0x1f0
Jun 30 11:13:22 betenoire kernel:        __mutex_lock+0x86/0x9f0
Jun 30 11:13:22 betenoire kernel:        mutex_lock_interruptible_nested+0x1b/0x20
Jun 30 11:13:22 betenoire kernel:        psmouse_attr_set_helper+0x31/0x160
Jun 30 11:13:22 betenoire kernel:        dev_attr_store+0x18/0x30
Jun 30 11:13:22 betenoire kernel:        sysfs_kf_write+0x42/0x60
Jun 30 11:13:22 betenoire kernel:        kernfs_fop_write+0x151/0x1e0
Jun 30 11:13:22 betenoire kernel:        __vfs_write+0x37/0x160
Jun 30 11:13:22 betenoire kernel:        vfs_write+0xc6/0x1c0
Jun 30 11:13:22 betenoire kernel:        SyS_write+0x58/0xc0
Jun 30 11:13:22 betenoire kernel:        do_syscall_64+0x6c/0x1c0
Jun 30 11:13:22 betenoire kernel:        return_from_SYSCALL_64+0x0/0x7a
Jun 30 11:13:22 betenoire kernel: 
                                  -> #0 (s_active#95){++++.+}:
Jun 30 11:13:22 betenoire kernel:        __lock_acquire+0x1367/0x13b0
Jun 30 11:13:22 betenoire kernel:        lock_acquire+0xa3/0x1f0
Jun 30 11:13:22 betenoire kernel:        __kernfs_remove+0x26b/0x310
Jun 30 11:13:22 betenoire kernel:        kernfs_remove_by_name_ns+0x45/0x90
Jun 30 11:13:22 betenoire kernel:        remove_files.isra.1+0x35/0x70
Jun 30 11:13:22 betenoire kernel:        sysfs_remove_group+0x44/0x90
Jun 30 11:13:22 betenoire kernel:        trackpoint_disconnect+0x24/0x40
Jun 30 11:13:22 betenoire kernel:        psmouse_disconnect+0xfc/0x180
Jun 30 11:13:22 betenoire kernel:        serio_disconnect_driver+0x32/0x40
Jun 30 11:13:22 betenoire kernel:        serio_driver_remove+0x15/0x20
Jun 30 11:13:22 betenoire kernel:        device_release_driver_internal+0x160/0x210
Jun 30 11:13:22 betenoire kernel:        device_release_driver+0x12/0x20
Jun 30 11:13:22 betenoire kernel:        serio_disconnect_port+0x98/0xb0
Jun 30 11:13:22 betenoire kernel:        serio_reconnect_subtree+0x51/0xb0
Jun 30 11:13:22 betenoire kernel:        serio_handle_event+0x17f/0x290
Jun 30 11:13:22 betenoire kernel:        process_one_work+0x253/0x6a0
Jun 30 11:13:22 betenoire kernel:        worker_thread+0x4d/0x3b0
Jun 30 11:13:22 betenoire kernel:        kthread+0x133/0x150
Jun 30 11:13:22 betenoire kernel:        ret_from_fork+0x2a/0x40
Jun 30 11:13:22 betenoire kernel: 
                                  other info that might help us debug this:
Jun 30 11:13:22 betenoire kernel:  Possible unsafe locking scenario:
Jun 30 11:13:22 betenoire kernel:        CPU0                    CPU1
Jun 30 11:13:22 betenoire kernel:        ----                    ----
Jun 30 11:13:22 betenoire kernel:   lock(psmouse_mutex);
Jun 30 11:13:22 betenoire kernel:                                lock(s_active#95);
Jun 30 11:13:22 betenoire kernel:                                lock(psmouse_mutex);
Jun 30 11:13:22 betenoire kernel:   lock(s_active#95);
Jun 30 11:13:22 betenoire kernel: 
                                   *** DEADLOCK ***
Jun 30 11:13:22 betenoire kernel: 6 locks held by kworker/0:1/73:
Jun 30 11:13:22 betenoire kernel:  #0:  ("events_long"){.+.+.+}, at: [<ffffffffb20d1790>] process_one_work+0x1d0/0x6a0
Jun 30 11:13:22 betenoire kernel:  #1:  (serio_event_work){+.+.+.}, at: [<ffffffffb20d1790>] process_one_work+0x1d0/0x6a0
Jun 30 11:13:22 betenoire kernel:  #2:  (serio_mutex){+.+.+.}, at: [<ffffffffb273df6b>] serio_handle_event+0x2b/0x290
Jun 30 11:13:22 betenoire kernel:  #3:  (&dev->mutex){......}, at: [<ffffffffb2639799>] device_release_driver_internal+0x39/0x210
Jun 30 11:13:22 betenoire kernel:  #4:  (&serio->drv_mutex){+.+.+.}, at: [<ffffffffb273cf60>] serio_disconnect_driver+0x20/0x40
Jun 30 11:13:22 betenoire kernel:  #5:  (psmouse_mutex){+.+.+.}, at: [<ffffffffb274e58c>] psmouse_disconnect+0x6c/0x180
Jun 30 11:13:22 betenoire kernel: 
                                  stack backtrace:
Jun 30 11:13:22 betenoire kernel: CPU: 0 PID: 73 Comm: kworker/0:1 Not tainted 4.12.0-0.rc6.git3.1.fc27.x86_64 #1
Jun 30 11:13:22 betenoire kernel: Hardware name: LENOVO 20FXS0BB14/20FXS0BB14, BIOS R07ET63W (2.03 ) 03/15/2016
Jun 30 11:13:22 betenoire kernel: Workqueue: events_long serio_handle_event
Jun 30 11:13:22 betenoire kernel: Call Trace:
Jun 30 11:13:22 betenoire kernel:  dump_stack+0x8e/0xcd
Jun 30 11:13:22 betenoire kernel:  print_circular_bug+0x1b6/0x210
Jun 30 11:13:22 betenoire kernel:  __lock_acquire+0x1367/0x13b0
Jun 30 11:13:22 betenoire kernel:  ? __kernfs_remove+0x19c/0x310
Jun 30 11:13:22 betenoire kernel:  lock_acquire+0xa3/0x1f0
Jun 30 11:13:22 betenoire kernel:  ? lock_acquire+0xa3/0x1f0
Jun 30 11:13:22 betenoire kernel:  ? kernfs_remove_by_name_ns+0x45/0x90
Jun 30 11:13:22 betenoire kernel:  __kernfs_remove+0x26b/0x310
Jun 30 11:13:22 betenoire kernel:  ? kernfs_remove_by_name_ns+0x45/0x90
Jun 30 11:13:22 betenoire kernel:  ? kernfs_name_hash+0x17/0x80
Jun 30 11:13:22 betenoire kernel:  ? kernfs_find_ns+0x7a/0x110
Jun 30 11:13:22 betenoire kernel:  kernfs_remove_by_name_ns+0x45/0x90
Jun 30 11:13:22 betenoire kernel:  remove_files.isra.1+0x35/0x70
Jun 30 11:13:22 betenoire kernel:  sysfs_remove_group+0x44/0x90
Jun 30 11:13:22 betenoire kernel:  trackpoint_disconnect+0x24/0x40
Jun 30 11:13:22 betenoire kernel:  psmouse_disconnect+0xfc/0x180
Jun 30 11:13:22 betenoire kernel:  serio_disconnect_driver+0x32/0x40
Jun 30 11:13:22 betenoire kernel:  serio_driver_remove+0x15/0x20
Jun 30 11:13:22 betenoire kernel:  device_release_driver_internal+0x160/0x210
Jun 30 11:13:22 betenoire kernel:  device_release_driver+0x12/0x20
Jun 30 11:13:22 betenoire kernel:  serio_disconnect_port+0x98/0xb0
Jun 30 11:13:22 betenoire kernel:  serio_reconnect_subtree+0x51/0xb0
Jun 30 11:13:22 betenoire kernel:  serio_handle_event+0x17f/0x290
Jun 30 11:13:22 betenoire kernel:  process_one_work+0x253/0x6a0
Jun 30 11:13:22 betenoire kernel:  worker_thread+0x4d/0x3b0
Jun 30 11:13:22 betenoire kernel:  kthread+0x133/0x150
Jun 30 11:13:22 betenoire kernel:  ? process_one_work+0x6a0/0x6a0
Jun 30 11:13:22 betenoire kernel:  ? kthread_create_on_node+0x70/0x70
Jun 30 11:13:22 betenoire kernel:  ret_from_fork+0x2a/0x40
Comment 1 Jan Pokorný 2017-06-30 12:18:27 EDT
As noted in [bug 1432481], I am booting to virtual terminal and have
gpm installed and enabled.
Comment 2 Laura Abbott 2018-04-06 14:49:31 EDT
Doing some pruning, this bug looks to be several kernel versions old. Please test on a newer kernel and reopen if the problem still exists.

Note You need to log in before you can comment on or make changes to this bug.