Commit c22fd840 authored by Revanth Rajashekar's avatar Revanth Rajashekar Committed by Yang Yingliang
Browse files

nvme: check the PRINFO bit before deciding the host buffer length



mainline inclusion
from mainline-5.11-rc5
commit 4d6b1c95
category: bugfix
bugzilla: 167363
CVE: NA

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

According to NVMe spec v1.4, section 8.3.1, the PRINFO bit and
the metadata size play a vital role in deteriming the host buffer size.

If PRIFNO bit is set and MS==8, the host doesn't add the metadata buffer,
instead the controller adds it.

Signed-off-by: default avatarRevanth Rajashekar <revanth.rajashekar@intel.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>

Conflicts:
	drivers/nvme/host/core.c
	[ Cleanup patch ffc89b1d("nvme: introduce namespace features
	  flag") is not applied. ]

Signed-off-by: default avatarZhihao Cheng <chengzhihao1@huawei.com>
Reviewed-by: default avatarHou Tao <houtao1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent b8ba22a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment