]> git.baikalelectronics.ru Git - kernel.git/commit
mt76: round up length on mt76_wr_copy
authorFelix Fietkau <nbd@nbd.name>
Mon, 1 Jul 2019 11:15:07 +0000 (13:15 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 5 Sep 2019 15:42:27 +0000 (17:42 +0200)
commite6f1b4a2be495e8977cdb0375e68e1e883759808
treeb6660812f06aabdab6b66d81954fe0984b5c42c5
parent9f8917e04e7516e4e53b7ff28fc32ed2baed1eb0
mt76: round up length on mt76_wr_copy

When beacon length is not a multiple of 4, the beacon could be sent with
the last 1-3 bytes corrupted. The skb data is guaranteed to have enough
room for reading beyond the end, because it is always followed by
skb_shared_info, so rounding up is safe.
All other callers of mt76_wr_copy have multiple-of-4 length already.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mmio.c
drivers/net/wireless/mediatek/mt76/usb.c