All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: linux-wireless@vger.kernel.org, ilw@linux.intel.com
Subject: Re: [PATCH 3.11] iwlwifi: dvm: fix calling ieee80211_chswitch_done() with NULL
Date: Fri, 26 Jul 2013 15:28:59 +0200	[thread overview]
Message-ID: <1374845339.8248.48.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <20130726132909.GA21925@redhat.com> (sfid-20130726_152609_851490_821A0124)

On Fri, 2013-07-26 at 15:29 +0200, Stanislaw Gruszka wrote:
> If channel switch is pending and we remove interface we can
> crash like showed below due to passing NULL vif to mac80211:
> 
> BUG: unable to handle kernel paging request at fffffffffffff8cc
> IP: [<ffffffff8130924d>] strnlen+0xd/0x40
> Call Trace:
>  [<ffffffff8130ad2e>] string.isra.3+0x3e/0xd0
>  [<ffffffff8130bf99>] vsnprintf+0x219/0x640
>  [<ffffffff8130c481>] vscnprintf+0x11/0x30
>  [<ffffffff81061585>] vprintk_emit+0x115/0x4f0
>  [<ffffffff81657bd5>] printk+0x61/0x63
>  [<ffffffffa048987f>] ieee80211_chswitch_done+0xaf/0xd0 [mac80211]
>  [<ffffffffa04e7b34>] iwl_chswitch_done+0x34/0x40 [iwldvm]
>  [<ffffffffa04f83c3>] iwlagn_commit_rxon+0x2a3/0xdc0 [iwldvm]
>  [<ffffffffa04ebc50>] ? iwlagn_set_rxon_chain+0x180/0x2c0 [iwldvm]
>  [<ffffffffa04e5e76>] iwl_set_mode+0x36/0x40 [iwldvm]
>  [<ffffffffa04e5f0d>] iwlagn_mac_remove_interface+0x8d/0x1b0 [iwldvm]
>  [<ffffffffa0459b3d>] ieee80211_do_stop+0x29d/0x7f0 [mac80211]
> 
> This is because we nulify ctx->vif in iwlagn_mac_remove_interface()
> before calling some other functions that teardown interface. To fix
> just check ctx->vif on iwl_chswitch_done(). We should not call
> ieee80211_chswitch_done() as channel switch works were already canceled
> by mac80211 in ieee80211_do_stop() -> ieee80211_mgd_stop().

Thanks, I've picked this up.

johannes


      reply	other threads:[~2013-07-26 13:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26 13:29 [PATCH 3.11] iwlwifi: dvm: fix calling ieee80211_chswitch_done() with NULL Stanislaw Gruszka
2013-07-26 13:28 ` Johannes Berg [this message]

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=1374845339.8248.48.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=ilw@linux.intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sgruszka@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 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.