Project

General

Profile

Bug #11230

Panic in nvme_fill_prp() because of miscalculation of the number of PRPs per page

Added by Paul Winder 13 days ago. Updated 5 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

In nvme_fill_prp()

        nprp_page = nvme->n_pagesize / sizeof (uint64_t) - 1;
        ASSERT(nprp_page > 0);
        nprp = (xfer->x_ndmac + nprp_page - 1) / nprp_page;

        /*
         * We currently don't support chained PRPs and set up our DMA
         * attributes to reflect that. If we still get an I/O request
         * that needs a chained PRP something is very wrong.
         */
        VERIFY(nprp == 1);

System can panic at the verify because the nprp_page is calculated as one to few. (First line in the snippet).


Related issues

Related to illumos gate - Feature #11202: Allow the number of NVMe submission and completion queues to be differentClosed

Actions

History

#1

Updated by Gergő Mihály Doma 12 days ago

  • Related to Feature #11202: Allow the number of NVMe submission and completion queues to be different added
#2

Updated by Electric Monk 5 days ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

git commit 0999c1123c1ab769df080ccc5f1626d50663e7a8

commit  0999c1123c1ab769df080ccc5f1626d50663e7a8
Author: Paul Winder <Paul.Winder@wdc.com>
Date:   2019-06-20T14:02:46.000Z

    11202 Allow the number of NVMe submission and completion queues to be different
    11228 nvme may queue more submissions than allowed
    11229 nvme_get_logpage() can allocate a too small buffer to receive logpage data
    11230 Panic in nvme_fill_prp() because of miscalculation of the number of PRPs per page
    11231 nvme in polled mode ignores the command call back
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
    Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
    Reviewed by: Youzhong Yang <youzhong@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF