wifi: mt76: handle failure of vzalloc in mt7615_coredump_work
authorKang Chen <void0red@gmail.com>
Mon, 27 Feb 2023 14:48:23 +0000 (22:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:24 +0000 (23:03 +0900)
commit710f3c7fb3e21b7ff5db9d4f15231864f5f5e66f
treeb87b6b29a1b930510368451b41a2edc8529747f7
parent9c036152adf8474aed92b76395cfa4e83d4b2d3b
wifi: mt76: handle failure of vzalloc in mt7615_coredump_work

[ Upstream commit 9e47dd9f64a47ae00ca0123017584c37209ee900 ]

vzalloc may fails, dump might be null and will cause
illegal address access later.

Link: https://lore.kernel.org/all/Y%2Fy5Asxw3T3m4jCw@lore-desk
Fixes: d2bf7959d9c0 ("mt76: mt7663: introduce coredump support")
Signed-off-by: Kang Chen <void0red@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt7615/mac.c