linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Javier Cardona <javier@cozybit.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	devel@lists.open80211s.org
Subject: Re: mesh RCU issues
Date: Sat, 14 May 2011 02:00:47 +0200	[thread overview]
Message-ID: <1305331247.680.7.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <BANLkTi=R_Eyz8+iZsk+=Gs4vaNo-0eUVng@mail.gmail.com> (sfid-20110513_222907_856686_A223EC2B)

On Fri, 2011-05-13 at 13:28 -0700, Javier Cardona wrote:

> diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
> index 83ce48e..1db8bba 100644
> --- a/net/mac80211/mesh_pathtbl.c
> +++ b/net/mac80211/mesh_pathtbl.c
[snip]

With this patch, I get the warnings below. The locking ones are
definitely genuine bugs, but the missing rcu_dereference() ones you
already fixed were bugs too, albeit only on the Alpha architecture (and
maybe elsewhere due to compiler optimisations?)

johannes

  CHECK   /home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:335:48: warning: incorrect type in argument 3 (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:335:48:    expected struct mesh_table *tbl
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:335:48:    got struct mesh_table [noderef] <asn:4>*static [addressable] [toplevel] mesh_paths
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:348:13: warning: incorrect type in argument 2 (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:348:13:    expected struct atomic_t [usertype] *v
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:348:13:    got struct atomic_t [noderef] <asn:4>*<noident>
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:382:16: warning: incorrect type in assignment (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:382:16:    expected struct mesh_table *oldtbl
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:382:16:    got struct mesh_table [noderef] <asn:4>*static [addressable] [toplevel] mesh_paths
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:383:29: warning: incorrect type in argument 1 (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:383:29:    expected struct mesh_table *oldtbl
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:383:29:    got struct mesh_table [noderef] <asn:4>*static [addressable] [toplevel] mesh_paths
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:406:16: warning: incorrect type in assignment (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:406:16:    expected struct mesh_table *oldtbl
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:406:16:    got struct mesh_table [noderef] <asn:4>*static [addressable] [toplevel] mpp_paths
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:407:29: warning: incorrect type in argument 1 (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:407:29:    expected struct mesh_table *oldtbl
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:407:29:    got struct mesh_table [noderef] <asn:4>*static [addressable] [toplevel] mpp_paths
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:459:48: warning: incorrect type in argument 3 (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:459:48:    expected struct mesh_table *tbl
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:459:48:    got struct mesh_table [noderef] <asn:4>*static [addressable] [toplevel] [assigned] mpp_paths
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:472:13: warning: incorrect type in argument 2 (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:472:13:    expected struct atomic_t [usertype] *v
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:472:13:    got struct atomic_t [noderef] <asn:4>*<noident>
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:600:49: warning: incorrect type in argument 3 (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:600:49:    expected struct mesh_table *tbl
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:600:49:    got struct mesh_table [noderef] <asn:4>*static [addressable] [toplevel] [assigned] mesh_paths
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:612:37: warning: incorrect type in argument 1 (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:612:37:    expected struct atomic_t [usertype] *v
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:612:37:    got struct atomic_t [noderef] <asn:4>*<noident>
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:748:20: warning: incorrect type in assignment (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:748:20:    expected struct mesh_table [noderef] <asn:4>*static [addressable] [toplevel] [assigned] mesh_paths
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:748:20:    got struct mesh_table *
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:755:19: warning: incorrect type in assignment (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:755:19:    expected struct mesh_table [noderef] <asn:4>*static [addressable] [toplevel] [assigned] mpp_paths
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:755:19:    got struct mesh_table *
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:757:33: warning: incorrect type in argument 1 (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:757:33:    expected struct mesh_table *tbl
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:757:33:    got struct mesh_table [noderef] <asn:4>*static [addressable] [toplevel] [assigned] mesh_paths
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:794:25: warning: incorrect type in argument 1 (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:794:25:    expected struct mesh_table *tbl
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:794:25:    got struct mesh_table [noderef] <asn:4>*static [addressable] [toplevel] [assigned] mesh_paths
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:795:25: warning: incorrect type in argument 1 (different address spaces)
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:795:25:    expected struct mesh_table *tbl
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:795:25:    got struct mesh_table [noderef] <asn:4>*static [addressable] [toplevel] [assigned] mpp_paths
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:266:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:266:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:266:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:266:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:336:19: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:338:23: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:349:17: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:349:47: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:354:25: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:363:25: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:373:6: warning: context imbalance in 'mesh_mpath_table_grow' - different lock contexts for basic block
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:397:6: warning: context imbalance in 'mesh_mpp_table_grow' - different lock contexts for basic block
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:460:19: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:462:23: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:473:17: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:473:46: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:476:25: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:485:25: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:513:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:513:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:513:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:513:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:550:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:550:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:550:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:550:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:564:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:564:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:564:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:564:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:601:19: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:603:23: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:621:25: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:751:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:752:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:753:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:760:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:761:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:762:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:775:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:775:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:775:9: warning: dereference of noderef expression
/home/johannes/sys/wireless-testing/net/mac80211/mesh_pathtbl.c:775:9: warning: dereference of noderef expression



  parent reply	other threads:[~2011-05-14  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-12 12:25 mesh RCU issues Johannes Berg
2011-05-12 13:03 ` [PATCH] mac80211: remove pointless mesh path timer RCU code Johannes Berg
2011-05-12 22:26 ` mesh RCU issues Javier Cardona
2011-05-13  7:13   ` Johannes Berg
2011-05-13 20:28     ` Javier Cardona
2011-05-13 23:30       ` Johannes Berg
2011-05-14  0:00       ` Johannes Berg [this message]
2011-05-14  3:52         ` Javier Cardona
2011-05-14  8:24           ` 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=1305331247.680.7.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=devel@lists.open80211s.org \
    --cc=javier@cozybit.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).