mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: paulmck@linux.vnet.ibm.com
Cc: Miles Lane <miles.lane@gmail.com>,
	Vivek Goyal <vgoyal@redhat.com>, Eric Paris <eparis@redhat.com>,
	Lai Jiangshan <laijs@cn.fujitsu.com>, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	nauman@google.com, eric.dumazet@gmail.com,
	netdev@vger.kernel.org, Jens Axboe <jens.axboe@oracle.com>,
	Gui Jianfeng <guijianfeng@cn.fujitsu.com>,
	Li Zefan <lizf@cn.fujitsu.com>
Subject: Re: [PATCH] RCU: don't turn off lockdep when find suspicious rcu_dereference_check() usage
Date: Sun, 25 Apr 2010 09:45:34 +0200	[thread overview]
Message-ID: <1272181534.3614.1.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <20100425023455.GM2440@linux.vnet.ibm.com>

On Sat, 2010-04-24 at 19:34 -0700, Paul E. McKenney wrote:

> > [   51.912282] [ INFO: suspicious rcu_dereference_check() usage. ]
> > [   51.912285] ---------------------------------------------------
> > [   51.912289] net/mac80211/sta_info.c:886 invoked
> > rcu_dereference_check() without protection!
> > [   51.912293]
> > [   51.912293] other info that might help us debug this:
> > [   51.912295]
> > [   51.912298]
> > [   51.912298] rcu_scheduler_active = 1, debug_locks = 1
> > [   51.912302] no locks held by wpa_supplicant/3951.
> > [   51.912305]
> > [   51.912306] stack backtrace:
> > [   51.912310] Pid: 3951, comm: wpa_supplicant Not tainted 2.6.34-rc5-git3 #22
> > [   51.912314] Call Trace:
> > [   51.912317]  <IRQ>  [<ffffffff81067fbe>] lockdep_rcu_dereference+0x9d/0xa5
> > [   51.912345]  [<ffffffffa014f9ae>]
> > ieee80211_find_sta_by_hw+0x46/0x10f [mac80211]
> > [   51.912358]  [<ffffffffa014fa8e>] ieee80211_find_sta+0x17/0x19 [mac80211]
> > [   51.912373]  [<ffffffffa01e50f2>] iwl_tx_queue_reclaim+0xdb/0x1b1 [iwlcore]
> > [   51.912380]  [<ffffffff8106842b>] ? mark_lock+0x2d/0x235
> > [   51.912391]  [<ffffffffa0252f1c>] iwl5000_rx_reply_tx+0x4a9/0x556 [iwlagn]
> > [   51.912399]  [<ffffffff8120a353>] ? is_swiotlb_buffer+0x2e/0x3b
> > [   51.912407]  [<ffffffffa024bbf4>] iwl_rx_handle+0x163/0x2b5 [iwlagn]
> > [   51.912414]  [<ffffffff81068904>] ? trace_hardirqs_on_caller+0xfa/0x13f
> > [   51.912422]  [<ffffffffa024c3ac>] iwl_irq_tasklet+0x2bb/0x3c0 [iwlagn]
> > [   51.912429]  [<ffffffff810411f3>] tasklet_action+0xa7/0x10f
> > [   51.912435]  [<ffffffff81042205>] __do_softirq+0x144/0x252
> > [   51.912442]  [<ffffffff81003a8c>] call_softirq+0x1c/0x34
> > [   51.912447]  [<ffffffff810050e4>] do_softirq+0x38/0x80
> > [   51.912452]  [<ffffffff81041cd2>] irq_exit+0x45/0x94
> > [   51.912457]  [<ffffffff81004829>] do_IRQ+0xad/0xc4
> > [   51.912463]  [<ffffffff810cbbd3>] ? might_fault+0x63/0xb3
> > [   51.912470]  [<ffffffff813cfb93>] ret_from_intr+0x0/0xf
> > [   51.912474]  <EOI>  [<ffffffff810cbbd3>] ? might_fault+0x63/0xb3
> > [   51.912484]  [<ffffffff8106a75d>] ? lock_release+0x208/0x215
> > [   51.912490]  [<ffffffff810cbc1c>] might_fault+0xac/0xb3
> > [   51.912495]  [<ffffffff810cbbd3>] ? might_fault+0x63/0xb3
> > [   51.912501]  [<ffffffff812025e3>] __clear_user+0x15/0x59
> > [   51.912508]  [<ffffffff8100b2bc>] save_i387_xstate+0x9c/0x1bc
> > [   51.912515]  [<ffffffff81002276>] do_signal+0x240/0x686
> > [   51.912521]  [<ffffffff81002b9c>] ? sysret_check+0x27/0x62
> > [   51.912527]  [<ffffffff8106891e>] ? trace_hardirqs_on_caller+0x114/0x13f
> > [   51.912533]  [<ffffffff813cec80>] ? trace_hardirqs_on_thunk+0x3a/0x3f
> > [   51.912539]  [<ffffffff810026e3>] do_notify_resume+0x27/0x5f
> > [   51.912545]  [<ffffffff813cec80>] ? trace_hardirqs_on_thunk+0x3a/0x3f
> > [   51.912551]  [<ffffffff81002e86>] int_signal+0x12/0x17
> 
> This is a repeat from last time that confused me at the time.  I could
> do a hacky "fix" by putting an RCU read-side critical section around
> the for_each_sta_info() in ieee80211_find_sta_by_hw(), but I do not
> understand this code well enough to feel comfortable doing so.
> 
> Johannes, any enlightenment?

The station locking is a tad confusing, but I've added the right
annotations already, should be coming to a kernel near you soon (i.e.
are in net-2.6 right now).

johannes


  reply	other threads:[~2010-04-25  7:46 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-08  1:26 INFO: suspicious rcu_dereference_check() usage - include/linux/cgroup.h:492 invoked rcu_dereference_check() without protection! Miles Lane
2010-03-11  3:28 ` Paul E. McKenney
2010-04-12 18:44   ` Eric Paris
2010-04-12 18:47     ` Peter Zijlstra
2010-04-14 10:47       ` Peter Zijlstra
2010-04-15 15:47         ` Paul E. McKenney
2010-04-19  3:45           ` Lai Jiangshan
2010-04-19 18:26         ` Eric Paris
2010-04-19 23:01           ` Paul E. McKenney
2010-04-20  1:25             ` Eric Paris
2010-04-20  3:04               ` Paul E. McKenney
2010-04-20  7:21                 ` Peter Zijlstra
2010-04-20  8:23                 ` [PATCH] RCU: don't turn off lockdep when find suspicious rcu_dereference_check() usage Lai Jiangshan
2010-04-20  8:36                   ` Peter Zijlstra
2010-04-20 12:31                   ` Eric Paris
2010-04-20 13:28                     ` Paul E. McKenney
     [not found]                     ` <j2ya44ae5cd1004200545q6be4ec82o18ae99d93e8c29c7@mail.gmail.com>
2010-04-20 13:52                       ` Paul E. McKenney
2010-04-20 15:38                         ` Miles Lane
2010-04-21  6:04                           ` Borislav Petkov
2010-04-21 21:45                             ` Paul E. McKenney
2010-04-21 21:35                           ` Paul E. McKenney
2010-04-21 21:48                             ` Paul E. McKenney
2010-04-21 21:57                             ` Eric Dumazet
2010-04-21 22:14                               ` Paul E. McKenney
2010-04-21 23:26                                 ` Eric W. Biederman
2010-04-22 14:56                             ` Vivek Goyal
2010-04-22 16:01                               ` Paul E. McKenney
2010-04-23 12:50                                 ` Miles Lane
2010-04-23 19:42                                   ` Paul E. McKenney
2010-04-23 19:43                                     ` [PATCH v2.6.34-rc5 01/12] rcu: Fix RCU lockdep splat in set_task_cpu on fork path Paul E. McKenney
2010-04-23 19:43                                     ` [PATCH v2.6.34-rc5 02/12] rcu: fix RCU lockdep splat on freezer_fork path Paul E. McKenney
2010-04-23 19:43                                     ` [PATCH v2.6.34-rc5 03/12] rcu: leave lockdep enabled after RCU lockdep splat Paul E. McKenney
2010-04-23 19:43                                     ` [PATCH v2.6.34-rc5 04/12] NFSv4: Fix the locking in nfs_inode_reclaim_delegation() Paul E. McKenney
2010-04-23 19:43                                     ` [PATCH v2.6.34-rc5 05/12] NFS: Fix RCU issues in the NFSv4 delegation code Paul E. McKenney
2010-04-23 19:43                                     ` [PATCH v2.6.34-rc5 06/12] KEYS: Fix an RCU warning Paul E. McKenney
2010-04-23 19:43                                     ` [PATCH v2.6.34-rc5 07/12] KEYS: Fix an RCU warning in the reading of user keys Paul E. McKenney
2010-04-23 19:43                                     ` [PATCH v2.6.34-rc5 08/12] cgroup: Fix an RCU warning in cgroup_path() Paul E. McKenney
2010-04-23 19:43                                     ` [PATCH v2.6.34-rc5 09/12] cgroup: Fix an RCU warning in alloc_css_id() Paul E. McKenney
2010-04-23 19:43                                     ` [PATCH v2.6.34-rc5 10/12] sched: Fix an RCU warning in print_task() Paul E. McKenney
2010-04-23 19:43                                     ` [PATCH v2.6.34-rc5 11/12] cgroup: Check task_lock in task_subsys_state() Paul E. McKenney
2010-04-23 19:43                                     ` [PATCH v2.6.34-rc5 12/12] memcg: css_id() must be called under rcu_read_lock() Paul E. McKenney
2010-04-23 22:59                                     ` [PATCH] RCU: don't turn off lockdep when find suspicious rcu_dereference_check() usage Miles Lane
2010-04-24  5:35                                       ` Miles Lane
2010-04-25  2:36                                         ` Paul E. McKenney
2010-04-25  2:34                                       ` Paul E. McKenney
2010-04-25  7:45                                         ` Johannes Berg [this message]
2010-04-25  7:49                                           ` David Miller
2010-04-26  2:07                                             ` Paul E. McKenney
2010-04-25 15:49                                         ` Miles Lane
2010-04-25 20:20                                           ` Miles Lane
2010-04-26 16:09                                             ` Paul E. McKenney
2010-04-26 18:35                                               ` Eric W. Biederman
2010-04-27  4:27                                                 ` Paul E. McKenney
2010-04-27 16:22                                                   ` Paul E. McKenney
2010-04-27 16:33                                                     ` Eric Dumazet
2010-04-27 17:58                                                     ` Miles Lane
2010-04-27 23:31                                                       ` Paul E. McKenney
2010-04-27 23:42                                                         ` David Miller
2010-04-27 23:52                                                           ` Paul E. McKenney
     [not found]                                         ` <p2ka44ae5cd1004281358n86ce29d2tbece16b2fb974dab@mail.gmail.com>
2010-04-28 21:37                                           ` Paul E. McKenney
2010-05-01 17:26                         ` Miles Lane
2010-05-01 21:55                           ` Paul E. McKenney
2010-05-02  2:00                             ` Miles Lane
2010-05-02  4:11                               ` Paul E. McKenney
2010-04-21  1:05             ` INFO: suspicious rcu_dereference_check() usage - include/linux/cgroup.h:492 invoked rcu_dereference_check() without protection! Li Zefan
2010-04-21  3:14               ` Paul E. McKenney
2010-04-14 16:03     ` Paul E. McKenney
2010-06-01 13:06 [PATCH] RCU: don't turn off lockdep when find suspicious rcu_dereference_check() usage Daniel J Blueman
2010-06-02 14:56 ` Paul E. McKenney
2010-06-02 15:24   ` Daniel J Blueman
2010-06-03  9:22   ` Li Zefan
2010-06-03 18:30     ` Paul E. McKenney
2010-06-04  2:44       ` Li Zefan
2010-06-04  4:10         ` Paul E. McKenney
2010-06-04  8:54           ` Daniel J Blueman

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=1272181534.3614.1.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=eparis@redhat.com \
    --cc=eric.dumazet@gmail.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=jens.axboe@oracle.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=miles.lane@gmail.com \
    --cc=mingo@elte.hu \
    --cc=nauman@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=vgoyal@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome