From: Johannes Berg <johannes@sipsolutions.net>
To: Felix Fietkau <nbd@openwrt.org>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/2] mac80211: validate skb->dev in the tx status path
Date: Fri, 07 Sep 2012 17:11:35 +0200 [thread overview]
Message-ID: <1347030695.4256.25.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1347029656-41430-1-git-send-email-nbd@openwrt.org>
On Fri, 2012-09-07 at 16:54 +0200, Felix Fietkau wrote:
> + if (!skb->dev) {
> p2p_sdata = rcu_dereference(local->p2p_sdata);
> if (p2p_sdata) {
> - cfg80211_mgmt_tx_status(
> - &p2p_sdata->wdev, cookie, skb->data,
> - skb->len, acked, GFP_ATOMIC);
> + skb->dev = p2p_sdata->dev;
> + found = true;
What's the point of this? p2p_sdata->dev will be NULL, just like
skb->dev already is?
> }
> - rcu_read_unlock();
> }
> +
> + if (!found)
> + skb->dev = NULL;
> + else if (ieee80211_is_nullfunc(hdr->frame_control) ||
> + ieee80211_is_qos_nullfunc(hdr->frame_control)) {
> + cfg80211_probe_status(skb->dev, hdr->addr1,
> + cookie, acked, GFP_ATOMIC);
> + } else {
> + cfg80211_mgmt_tx_status(
> + skb->dev->ieee80211_ptr, cookie, skb->data,
> + skb->len, acked, GFP_ATOMIC);
And therefore this will crash.
johannes
next prev parent reply other threads:[~2012-09-07 15:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-07 14:54 [PATCH 1/2] mac80211: validate skb->dev in the tx status path Felix Fietkau
2012-09-07 14:54 ` [PATCH 2/2] mac80211: prevent work queueing while quiescing on suspend Felix Fietkau
2012-09-09 9:15 ` Arik Nemtsov
2012-09-09 11:59 ` Arik Nemtsov
2012-09-07 15:11 ` Johannes Berg [this message]
2012-09-07 15:27 ` [PATCH 1/2] mac80211: validate skb->dev in the tx status path Felix Fietkau
2012-09-07 15:24 ` Ben Greear
2012-09-07 15:28 ` Johannes Berg
2012-09-07 15:37 ` Ben Greear
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=1347030695.4256.25.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@openwrt.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).