Commit 78d28a2d authored by Lei Rao's avatar Lei Rao Committed by Yong Hu
Browse files

nvme-pci: clear the prp2 field when not used

stable inclusion
from stable-v5.10.160
commit 74b139c63f0775cf79266e9d9546c62b73fb3385
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7PZZC
CVE: NA

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



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

[ Upstream commit a56ea614 ]

If the prp2 field is not filled in nvme_setup_prp_simple(), the prp2
field is garbage data. According to nvme spec, the prp2 is reserved if
the data transfer does not cross a memory page boundary, so clear it to
zero if it is not used.

Signed-off-by: default avatarLei Rao <lei.rao@intel.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYong Hu <yong.hu@windriver.com>
parent 22927f0f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment