soc: fsl: dpaa2-console: free buffer before returning from dpaa2_console_read
stable inclusion from stable-5.10.80 commit 41968262bb24772280a0b6fbc808cf740ae961d4 bugzilla: 185821 https://gitee.com/openeuler/kernel/issues/I4L7CG Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=41968262bb24772280a0b6fbc808cf740ae961d4 -------------------------------- [ Upstream commit 8120bd46 ] Free the kbuf buffer before returning from the dpaa2_console_read() function. The variable no longer goes out of scope, leaking the storage it points to. Fixes: c93349d8 ("soc: fsl: add DPAA2 console support") Signed-off-by: NRobert-Ionut Alexa <robert-ionut.alexa@nxp.com> Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: NLi Yang <leoyang.li@nxp.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Reviewed-by: NWeilong Chen <chenweilong@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录