Linux wireless drivers development
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: linux-wireless@vger.kernel.org
Subject: Re: WARNING: slow-path
Date: Mon, 12 Oct 2009 14:08:26 +0100	[thread overview]
Message-ID: <1255352906.30919.11.camel@macbook.infradead.org> (raw)
In-Reply-To: <200910121335.21807.hs4233@mail.mn-solutions.de>

On Mon, 2009-10-12 at 13:35 +0200, Holger Schurig wrote:
> [   33.369923] WARNING: at net/wireless/mlme.c:135 __cfg80211_send_deauth+0x3f/0x1e1 [cfg80211]()

You're triggering the warning at line 135 of net/wireless/mlme.c, which
is 'ASSERT_WDEV_LOCK(wdev)' -- it's complaining that the lock isn't
held.
 
> static int lbs_cfg_ret_deauth(struct lbs_private *priv, unsigned long dummy,
>                            struct cmd_header *resp)
>         cfg80211_send_deauth(priv->dev, (u8 *)&mgmt, sizeof(mgmt),
>                              (void *)dummy); 

What happens if you make that last argument NULL instead of passing
'dummy' back to it? That makes cfg80211_send_deauth() magically do
different things w.r.t. locking. Johannes, this is _evil_:

void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len,
                          void *cookie)
{
        struct wireless_dev *wdev = dev->ieee80211_ptr;

        BUG_ON(cookie && wdev != cookie);

        if (cookie) {
                /* called within callback */
                __cfg80211_send_deauth(dev, buf, len);
        } else {
                wdev_lock(wdev);
                __cfg80211_send_deauth(dev, buf, len);
                wdev_unlock(wdev);
        }
}


-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation


  reply	other threads:[~2009-10-12 13:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-12 11:35 WARNING: slow-path Holger Schurig
2009-10-12 13:08 ` David Woodhouse [this message]
2009-10-12 14:02   ` Holger Schurig

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=1255352906.30919.11.camel@macbook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=hs4233@mail.mn-solutions.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox