From: Christian Lamparter <chunkeey@googlemail.com>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, helmut.schaa@googlemail.com
Subject: [PATCH] mac80211: fix oops in ieee80211_beacon_get_tim
Date: Mon, 28 Sep 2015 20:58:40 +0200 [thread overview]
Message-ID: <1673287.PfdWxMzLgk@debian64> (raw)
This patch fixes a crash which is triggered
by __ieee80211_beacon_get returning NULL.
This causes sky_copy to crash later unless
the hardware supports BEACON_TX_STATUS
feature.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
"mac80211: Copy tx'ed beacons to monitor mode" added the skb_copy.
There are few other possibilities to do this. This is just one.
---
net/mac80211/tx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f7317a7..666e46b 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3530,6 +3530,9 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
struct ieee80211_supported_band *sband;
int shift;
+ if (!bcn)
+ return bcn;
+
if (tim_offset)
*tim_offset = offs.tim_offset;
--
2.5.3
next reply other threads:[~2015-09-28 18:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 18:58 Christian Lamparter [this message]
2015-09-28 19:04 ` [PATCH] mac80211: fix oops in ieee80211_beacon_get_tim Helmut Schaa
2015-09-29 13:58 ` 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=1673287.PfdWxMzLgk@debian64 \
--to=chunkeey@googlemail.com \
--cc=helmut.schaa@googlemail.com \
--cc=johannes@sipsolutions.net \
--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).