-
由 Quanyang Wang 提交于
stable inclusion from stable-5.10.37 commit 1231279389b5e638bc3b66b9741c94077aed4b5a bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit a2c5bedb ] When handling op->addr, it is using the buffer "tmpbuf" which has been freed. This will trigger a use-after-free KASAN warning. Let's use temporary variables to store op->addr.val and op->cmd.opcode to fix this issue. Fixes: 1c26372e ("spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework") Signed-off-by: NQuanyang Wang <quanyang.wang@windriver.com> Link: https://lore.kernel.org/r/20210416004652.2975446-5-quanyang.wang@windriver.comSigned-off-by: NMark Brown <broonie@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
c9b4c57c