Project

General

Profile

Actions

Bug #14365

closed

memlist_insert() throws memlists away with empty lists

Added by Robert Mustacchi 13 days ago. Updated 3 days ago.

Status:
Closed
Priority:
Normal
Category:
kernel
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

If you try to use memlist_insert() from the uts/common/os/memlist_new.c school of memlists and the curmemlistp is empty, it will fail entirely. The problem here is that when it doesn't find an instance for last here, it then we end up discarding this entirely and never setting *curmemlistp. The solution here is that if last is actually NULL, that we come back here and actually assign new to *curmemlistp.

Actions #1

Updated by Electric Monk 13 days ago

  • Gerrit CR set to 1915
Actions #2

Updated by Robert Mustacchi 12 days ago

I tested this in two ways:

  1. By using a platform that was causing this style of memlist to come up and verifying that we now correctly get through the initalization logic and all the way up through PCIe device enum.
  2. By using existing platforms (e.g. generic x86 systems) and booting them under these boots. To verify that nothing had changed in two ways:
    1. Looking at differences in a prtconf -vP between the two systems. The only thing that had changed were some minors being attached and detached. Critically all the hardware properties such as what memory addresses were assigned to BARs were the same.
    2. Using pcieadm to dump configuration space for all devices before and after this change and comparing its contents. Configuration space had not changed except in one or two cases where a page allocation order was switched around (e.g. one device got an MSI address of 0xfee1d000 instead of 0xfee1b000 and vice-versa.
Actions #3

Updated by Electric Monk 3 days ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit e0cd43fe10732fee98e49dcb194f13ded2d5b660

commit  e0cd43fe10732fee98e49dcb194f13ded2d5b660
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2022-01-15T18:40:54.000Z

    14365 memlist_insert() throws memlists away with empty lists
    Reviewed by: Jason King <jason.brian.king@gmail.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF