]> git.baikalelectronics.ru Git - kernel.git/commit
mt76: mt7921: fix the coredump is being truncated
authorSean Wang <sean.wang@mediatek.com>
Thu, 17 Jun 2021 01:39:19 +0000 (09:39 +0800)
committerFelix Fietkau <nbd@nbd.name>
Sat, 19 Jun 2021 07:22:51 +0000 (09:22 +0200)
commite1051fd708d770588da5aa4dff5cefe4c046a6ce
treed8bbb801469166d95ae9742ddbeaf2051abb3a2b
parentbea63cd70bea5713e5f124bf3e1f6639030dd7eb
mt76: mt7921: fix the coredump is being truncated

Fix the maximum size of the coredump generated with current mt7921
firmware. Otherwise, a truncated coredump would be reported to userland
via dev_coredumpv.

Also, there is an additional error handling enhanced in the patch to avoid
the possible invalid buffer access when the system failed to create the
buffer to hold the coredump.

Fixes: e52e6e7ce1ec ("mt76: mt7921: add coredump support")
Co-developed-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76_connac.h
drivers/net/wireless/mediatek/mt76/mt7921/mac.c