]> git.ipfire.org Git - people/arne_f/kernel.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:34:41 +0000 (08:34 +0100)
commit930bb3092fe606baa23d57ae59b70b291d67a8af
tree486d6e2f3550ac1c3d15f804ac8f55f811488032
parentf95a1253d79449da7d0f06eab1feca4530e3b813
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