Skip to contentSkip to conversation

mac80211: Fix panic on fragmentation with power saving

PATCH New Jouni Malinen 1 participant 1 message Mar 13, 2009 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: Fix panic on fragmentation with power saving

It was possible to hit a kernel panic on NULL pointer dereference in dev_queue_xmit() when sending power save buffered frames to a STA that woke up from sleep. This happened when the buffered frame was requeued for transmission in ap_sta_ps_end(). In order to avoid the panic, copy the skb->dev and skb->iif values from the first fragment to all other fragments.

---
 net/mac80211/tx.c |    2 ++
 1 file changed, 2 insertions(+)
net/mac80211/tx.c +2 -0
@@ -784,6 +784,8 @@ ieee80211_tx_h_fragment(struct ieee80211
 		skb_copy_queue_mapping(frag, first);
 
 		frag->do_not_encrypt = first->do_not_encrypt;
+		frag->dev = first->dev;
+		frag->iif = first->iif;
 
 		pos += copylen;
 		left -= copylen;
Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA