mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-14 06:12:01 +01:00
nvme: Add locking asserts
nvme_qpair_complete_tracker and nvme_qpair_manual_complete_tracker have to be called without the qpair lock, so assert its unowned. Sponsored by: Netflix
This commit is contained in:
parent
da4230af3f
commit
5a178b831a
@ -414,10 +414,12 @@ static void
|
||||
nvme_qpair_complete_tracker(struct nvme_tracker *tr,
|
||||
struct nvme_completion *cpl, error_print_t print_on_error)
|
||||
{
|
||||
struct nvme_qpair * qpair = tr->qpair;
|
||||
struct nvme_qpair *qpair = tr->qpair;
|
||||
struct nvme_request *req;
|
||||
bool retry, error, retriable;
|
||||
|
||||
mtx_assert(&qpair->lock, MA_NOTOWNED);
|
||||
|
||||
req = tr->req;
|
||||
error = nvme_completion_is_error(cpl);
|
||||
retriable = nvme_completion_is_retry(cpl);
|
||||
@ -486,11 +488,12 @@ nvme_qpair_manual_complete_tracker(
|
||||
error_print_t print_on_error)
|
||||
{
|
||||
struct nvme_completion cpl;
|
||||
struct nvme_qpair * qpair = tr->qpair;
|
||||
|
||||
mtx_assert(&qpair->lock, MA_NOTOWNED);
|
||||
|
||||
memset(&cpl, 0, sizeof(cpl));
|
||||
|
||||
struct nvme_qpair * qpair = tr->qpair;
|
||||
|
||||
cpl.sqid = qpair->id;
|
||||
cpl.cid = tr->cid;
|
||||
cpl.status |= NVMEF(NVME_STATUS_SCT, sct);
|
||||
|
Loading…
Reference in New Issue
Block a user