All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
To: Luciano Coelho <coelho@ti.com>
Cc: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>,
	linux-wireless@vger.kernel.org, johannes@sipsolutions.net,
	victorg@ti.com, linville@tuxdriver.com, kgiori@qca.qualcomm.com,
	zefir.kurtisi@neratec.com, adrian@freebsd.org, j@w1.fi,
	igalc@ti.com, nbd@nbd.name,
	mathias.kretschmer@fokus.fraunhofer.de,
	Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Subject: Re: [PATCHv6 2/6] cfg80211: check radar interface combinations
Date: Wed, 30 Jan 2013 17:56:36 +0100	[thread overview]
Message-ID: <20130130165636.GA27636@pandem0nium> (raw)
In-Reply-To: <1359563688.14894.54.camel@cumari.coelho.fi>

[-- Attachment #1: Type: text/plain, Size: 1685 bytes --]

Hey Luca,

On Wed, Jan 30, 2013 at 06:34:48PM +0200, Luciano Coelho wrote:
> [...]
>
> > @@ -1195,14 +1196,36 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev,
> >  	enum cfg80211_chan_mode chmode;
> >  	int num_different_channels = 0;
> >  	int total = 1;
> > +	bool radar_required;
> >  	int i, j;
> >  
> >  	ASSERT_RTNL();
> >  	lockdep_assert_held(&rdev->devlist_mtx);
> >  
> > +	if (WARN_ON(hweight32(radar_detect) > 1))
> > +		return -EINVAL;
> > +
> > +	switch (iftype) {
> > +	case NL80211_IFTYPE_ADHOC:
> > +	case NL80211_IFTYPE_AP:
> > +	case NL80211_IFTYPE_AP_VLAN:
> > +	case NL80211_IFTYPE_MESH_POINT:
> > +	case NL80211_IFTYPE_P2P_GO:
> > +		radar_required = !!(chan->flags & IEEE80211_CHAN_RADAR);
> > +		break;
> 
> This code is causing an oops with the wl18xx driver in AP mode.  The
> problem is that cfg80211_can_change_interface() calls
> cfg80211_can_use_iftype_chan() with chan == NULL.  This code doesn't
> check if chan is NULL, so this dereference causes the oops.

Sorry about that - I believe you've found the same bug I've posted a patch
for a few days ago. Johannes already has this in mac80211-next, but it is
not yet in wireless-testing:

http://article.gmane.org/gmane.linux.kernel.wireless.general/102836/match=simon
http://git.kernel.org/?p=linux/kernel/git/jberg/mac80211-next.git;a=commit;h=683d41ae6755e6ae297ec09603c229795ab9566e

> 
> I don't have the time right now to fix this, but I'll look into it
> tomorrow (unless someone comes with a fix before that :P).

Please have a look at the patch posted above (both links for the same patch).

Cheers,
	Simon

> [...] 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-01-30 16:56 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-08 13:04 [PATCHv6 0/6] Add DFS master ability Simon Wunderlich
2013-01-08 13:04 ` [PATCHv6 1/6] nl80211: check if channel can be used in join_ibss Simon Wunderlich
2013-01-16 22:35   ` Johannes Berg
2013-01-17 13:27     ` Simon Wunderlich
2013-01-08 13:04 ` [PATCHv6 2/6] cfg80211: check radar interface combinations Simon Wunderlich
2013-01-16 22:42   ` Johannes Berg
2013-01-16 22:44     ` Johannes Berg
2013-01-17 13:28       ` Simon Wunderlich
2013-01-30 16:34   ` Luciano Coelho
2013-01-30 16:56     ` Simon Wunderlich [this message]
2013-01-30 17:20       ` Luciano Coelho
2013-01-08 13:04 ` [PATCHv6 3/6] nl80211/cfg80211: add radar detection command/event Simon Wunderlich
2013-01-16 22:51   ` Johannes Berg
2013-01-17 13:40     ` Simon Wunderlich
2013-01-18 21:54       ` Johannes Berg
2013-01-21 10:44         ` Zefir Kurtisi
2013-01-23 12:49           ` Simon Wunderlich
2013-01-24 12:56             ` Zefir Kurtisi
2013-01-08 13:04 ` [PATCHv6 4/6] mac80211: " Simon Wunderlich
2013-01-16 22:59   ` Johannes Berg
2013-01-17 13:52     ` Simon Wunderlich
2013-01-18 22:00       ` Johannes Berg
2013-01-23 12:42         ` Simon Wunderlich
2013-01-08 13:04 ` [PATCHv6 5/6] mac80211: check radar interaction with scan and roc Simon Wunderlich
2013-01-16 23:00   ` Johannes Berg
2013-01-17 13:53     ` Simon Wunderlich
2013-01-08 13:04 ` [PATCHv6 6/6] nl80211: allow DFS in start_ap Simon Wunderlich
2013-01-16 23:22 ` [PATCHv6 0/6] Add DFS master ability Johannes Berg
2013-01-17 14:21   ` Simon Wunderlich
2013-01-18 22:08     ` Johannes Berg
2013-01-21 10:46       ` Zefir Kurtisi
2013-01-23 12:52         ` Simon Wunderlich
2013-01-24 12:19           ` Zefir Kurtisi
2013-01-23 12:57       ` Simon Wunderlich

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=20130130165636.GA27636@pandem0nium \
    --to=simon.wunderlich@s2003.tu-chemnitz.de \
    --cc=adrian@freebsd.org \
    --cc=coelho@ti.com \
    --cc=igalc@ti.com \
    --cc=j@w1.fi \
    --cc=johannes@sipsolutions.net \
    --cc=kgiori@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mathias.kretschmer@fokus.fraunhofer.de \
    --cc=nbd@nbd.name \
    --cc=siwu@hrz.tu-chemnitz.de \
    --cc=victorg@ti.com \
    --cc=zefir.kurtisi@neratec.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.