intel_th: msu-sink: Potential dereference of null pointer
stable inclusion from stable-v5.10.137 commit 81222cfda686f962a1fca8f635c0bdf452dbc57b category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=81222cfda686f962a1fca8f635c0bdf452dbc57b -------------------------------- [ Upstream commit 82f76a4a ] The return value of dma_alloc_coherent() needs to be checked. To avoid use of null pointer in sg_set_buf() in case of the failure of alloc. Fixes: f220df66 ("intel_th: msu-sink: An example msu buffer "sink"") Reviewed-by:Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Jiasheng Jiang <jiasheng@iscas.ac.cn> Signed-off-by:
Alexander Shishkin <alexander.shishkin@linux.intel.com> Link: https://lore.kernel.org/r/20220705082637.59979-3-alexander.shishkin@linux.intel.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com> Reviewed-by:
Wei Li <liwei391@huawei.com>
Loading
Please sign in to comment