rt2x00: Fix panic on frame padding for rt2800 usb devices
authorIsmael Luceno <ismael.luceno@gmail.com>
Mon, 27 Dec 2010 14:06:17 +0000 (15:06 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 4 Jan 2011 19:35:14 +0000 (14:35 -0500)
commit11f16aefcc07178972f149f1a1d53e6868481394
tree33944c9e2886172b0a31844473373cdc1ebe607e
parent736e3acadce8438e610b897af2b1c472ed58444b
rt2x00: Fix panic on frame padding for rt2800 usb devices

Backtrace:
  rt2800usb_write_tx_data
  rt2x00queue_write_tx_frame
  rt2x00mac_tx
  invoke_tx_handlers
  __ieee80211_tx
  ieee80211_tx
  virt_to_head_page
  ieee80211_xmit
  ieee80211_tx_skb
  ieee80211_scan_work
  schedule
  ieee80211_scan_work
  process_one_work
  ...

It tried to expand the skb past it's end using skb_put. So I replaced it
with a call to skb_padto, which takes the issue into account.

Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800usb.c