All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Theil <markus.theil@tu-ilmenau.de>
To: linux-wireless@vger.kernel.org
Subject: Possible deadlock in cfg80211
Date: Wed, 8 Jan 2020 12:23:29 +0100	[thread overview]
Message-ID: <64dc212d-fde7-ab84-369c-c7cb5bf579d7@tu-ilmenau.de> (raw)

Hi,

while testing hostapd with hwsim, the following deadlock was reported:

[  500.865102] ============================================
[  500.865106] WARNING: possible recursive locking detected
[  500.865112] 5.4.8-arch1-1 #1 Not tainted
[  500.865117] --------------------------------------------
[  500.865122] kworker/3:0/36 is trying to acquire lock:
[  500.865127] ffff8881acdf0d08 (&wdev->mtx){+.+.}, at:
cfg80211_stop_ap+0x37/0x60 [cfg80211]
[  500.865249]
               but task is already holding lock:
[  500.865253] ffff8881acdf0d08 (&wdev->mtx){+.+.}, at:
cfg80211_autodisconnect_wk+0x3d/0x190 [cfg80211]
[  500.865354]
               other info that might help us debug this:
[  500.865358]  Possible unsafe locking scenario:

[  500.865363]        CPU0
[  500.865366]        ----
[  500.865369]   lock(&wdev->mtx);
[  500.865373]   lock(&wdev->mtx);
[  500.865378]
                *** DEADLOCK ***

[  500.865382]  May be due to missing lock nesting notation

[  500.865388] 3 locks held by kworker/3:0/36:
[  500.865391]  #0: ffff8881d4c22148 ((wq_completion)events){+.+.}, at:
process_one_work+0x4ee/0xac0
[  500.865407]  #1: ffff8881d4327dc8
((work_completion)(&wdev->disconnect_wk)){+.+.}, at:
process_one_work+0x4ee/0xac0
[  500.865418]  #2: ffff8881acdf0d08 (&wdev->mtx){+.+.}, at:
cfg80211_autodisconnect_wk+0x3d/0x190 [cfg80211]
[  500.865517]
               stack backtrace:
[  500.865524] CPU: 3 PID: 36 Comm: kworker/3:0 Not tainted 5.4.8-arch1-1 #1
[  500.865530] Hardware name: LENOVO 2349QM6/2349QM6, BIOS G1ETC2WW
(2.82 ) 08/07/2019
[  500.865628] Workqueue: events cfg80211_autodisconnect_wk [cfg80211]
[  500.865634] Call Trace:
[  500.865645]  dump_stack+0xb8/0x110
[  500.865654]  __lock_acquire.cold+0xe2/0x212
[  500.865672]  ? lockdep_hardirqs_on+0x260/0x260
[  500.865681]  ? find_held_lock+0x8c/0xa0
[  500.865693]  lock_acquire+0xe5/0x220
[  500.865772]  ? cfg80211_stop_ap+0x37/0x60 [cfg80211]
[  500.865783]  __mutex_lock+0x137/0xd00
[  500.865864]  ? cfg80211_stop_ap+0x37/0x60 [cfg80211]
[  500.865873]  ? preempt_count_sub+0x14/0xc0
[  500.865880]  ? __mutex_lock+0x71f/0xd00
[  500.865888]  ? find_first_zero_bit+0x28/0x50
[  500.865977]  ? cfg80211_stop_ap+0x37/0x60 [cfg80211]
[  500.865986]  ? mutex_lock_io_nested+0xc20/0xc20
[  500.866090]  ? cfg80211_autodisconnect_wk+0x3d/0x190 [cfg80211]
[  500.866098]  ? mutex_lock_io_nested+0xc20/0xc20
[  500.866109]  ? lockdep_hardirqs_on+0x260/0x260
[  500.866116]  ? match_held_lock+0x2e/0x240
[  500.866127]  ? preempt_count_sub+0x14/0xc0
[  500.866224]  ? cfg80211_stop_ap+0x37/0x60 [cfg80211]
[  500.866322]  cfg80211_stop_ap+0x37/0x60 [cfg80211]
[  500.866433]  cfg80211_autodisconnect_wk+0xd5/0x190 [cfg80211]
[  500.866445]  process_one_work+0x5c0/0xac0
[  500.866460]  ? pwq_dec_nr_in_flight+0x110/0x110
[  500.866480]  worker_thread+0x7a/0x690
[  500.866497]  kthread+0x1ab/0x200
[  500.866505]  ? process_one_work+0xac0/0xac0
[  500.866511]  ? kthread_create_on_node+0xd0/0xd0
[  500.866521]  ret_from_fork+0x3a/0x50

Markus


             reply	other threads:[~2020-01-08 11:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 11:23 Markus Theil [this message]
2020-01-08 14:45 ` Possible deadlock in cfg80211 Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=64dc212d-fde7-ab84-369c-c7cb5bf579d7@tu-ilmenau.de \
    --to=markus.theil@tu-ilmenau.de \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.