]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme: free sq/cq dbbuf pointers when dbbuf set fails
authorMinwoo Im <minwoo.im.dev@gmail.com>
Thu, 5 Nov 2020 14:28:47 +0000 (23:28 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Dec 2020 07:48:09 +0000 (08:48 +0100)
commitfd1c1de8c4589fdd528733bfd01ed0c5f3f69204
treee17f042b23689af23c53ddd2e6fc60c1d35d4192
parent49d04a6948825b309411d13e97109857e4f76de6
nvme: free sq/cq dbbuf pointers when dbbuf set fails

[ Upstream commit 0f0d2c876c96d4908a9ef40959a44bec21bdd6cf ]

If Doorbell Buffer Config command fails even 'dev->dbbuf_dbs != NULL'
which means OACS indicates that NVME_CTRL_OACS_DBBUF_SUPP is set,
nvme_dbbuf_update_and_check_event() will check event even it's not been
successfully set.

This patch fixes mismatch among dbbuf for sq/cqs in case that dbbuf
command fails.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/pci.c