Skip to content

Commit

Permalink
[PATCH] zd1211rw: zd_mac_rx isn't always called in IRQ context
Browse files Browse the repository at this point in the history
e.g.

usb 1-7: rx_urb_complete() *** first fragment ***
usb 1-7: rx_urb_complete() *** second fragment ***
drivers/net/wireless/zd1211rw/zd_mac.c:1063 ASSERT
(((current_thread_info()->preempt_count) & (((1UL << (12))-1) << ((0 +
8) + 8)))) VIOLATED!
 [<f0299448>] zd_mac_rx+0x3e7/0x47a [zd1211rw]
 [<f029badc>] rx_urb_complete+0x22d/0x24a [zd1211rw]
 [<b028a22f>] urb_destroy+0x0/0x5
 [<b01f0930>] kref_put+0x65/0x72
 [<b0288cdf>] usb_hcd_giveback_urb+0x28/0x57
 [<b02950c4>] qh_completions+0x296/0x2f6
 [<b0294b21>] ehci_urb_done+0x70/0x7a
 [<b0294ea1>] qh_completions+0x73/0x2f6
 [<b02951bc>] ehci_work+0x98/0x538

Remove the bogus assertion, and use dev_kfree_skb_any as pointed out by
Ulrich Kunitz.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Daniel Drake authored and John W. Linville committed Dec 6, 2006
1 parent e624386 commit 383956a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/wireless/zd1211rw/zd_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1059,10 +1059,8 @@ int zd_mac_rx(struct zd_mac *mac, const u8 *buffer, unsigned int length)
memcpy(skb_put(skb, length), buffer, length);

r = ieee80211_rx(ieee, skb, &stats);
if (!r) {
ZD_ASSERT(in_irq());
dev_kfree_skb_irq(skb);
}
if (!r)
dev_kfree_skb_any(skb);
return 0;
}

Expand Down

0 comments on commit 383956a

Please sign in to comment.