* [PATCH] mac80211: fix oops in ieee80211_beacon_get_tim
@ 2015-09-28 18:58 Christian Lamparter
2015-09-28 19:04 ` Helmut Schaa
2015-09-29 13:58 ` Johannes Berg
0 siblings, 2 replies; 3+ messages in thread
From: Christian Lamparter @ 2015-09-28 18:58 UTC (permalink / raw)
To: linux-wireless; +Cc: johannes, helmut.schaa
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mac80211: fix oops in ieee80211_beacon_get_tim
2015-09-28 18:58 [PATCH] mac80211: fix oops in ieee80211_beacon_get_tim Christian Lamparter
@ 2015-09-28 19:04 ` Helmut Schaa
2015-09-29 13:58 ` Johannes Berg
1 sibling, 0 replies; 3+ messages in thread
From: Helmut Schaa @ 2015-09-28 19:04 UTC (permalink / raw)
To: Christian Lamparter, linux-wireless; +Cc: johannes
Christian Lamparter <chunkeey@googlemail.com> schrieb:
>This patch fixes a crash which is triggered
>by __ieee80211_beacon_get returning NULL.
Ouch, thanks for catching this!
Helmut
>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;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mac80211: fix oops in ieee80211_beacon_get_tim
2015-09-28 18:58 [PATCH] mac80211: fix oops in ieee80211_beacon_get_tim Christian Lamparter
2015-09-28 19:04 ` Helmut Schaa
@ 2015-09-29 13:58 ` Johannes Berg
1 sibling, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2015-09-29 13:58 UTC (permalink / raw)
To: Christian Lamparter, linux-wireless; +Cc: helmut.schaa
On Mon, 2015-09-28 at 20:58 +0200, Christian Lamparter wrote:
> 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.
Thanks, I rebased this in ...
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-29 13:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-28 18:58 [PATCH] mac80211: fix oops in ieee80211_beacon_get_tim Christian Lamparter
2015-09-28 19:04 ` Helmut Schaa
2015-09-29 13:58 ` Johannes Berg
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).