Commit 9bc7cbc0 authored by Xuan Zhuo's avatar Xuan Zhuo Committed by Zheng Zengkai
Browse files

virtio_ring: check desc == NULL when using indirect with packed

stable inclusion
from stable-5.10.80
commit c8447cb14a125ba25255e4d6b380ce7a14a3fecd
bugzilla: 185821 https://gitee.com/openeuler/kernel/issues/I4L7CG

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c8447cb14a125ba25255e4d6b380ce7a14a3fecd



--------------------------------

[ Upstream commit fc6d70f4 ]

When using indirect with packed, we don't check for allocation failures.
This patch checks that and fall back on direct.

Fixes: 1ce9e605 ("virtio_ring: introduce packed ring support")
Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
Link: https://lore.kernel.org/r/20211020112323.67466-3-xuanzhuo@linux.alibaba.com


Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Reviewed-by: default avatarWeilong Chen <chenweilong@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>

Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent ae6e5d1d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment