lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 May 2007 14:17:20 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	ebiederm@...ssion.com (Eric W. Biederman)
Cc:	"Mike Miller (OS Dev)" <mikem@...rdog.cca.cpqcorp.net>,
	linux-kernel@...r.kernel.org, tom.l.nguyen@...el.com,
	iss_storagedev@...com, jens.axboe@...cle.com,
	Michael Ellerman <michael@...erman.id.au>
Subject: Re: [PATCH] msi: Fix the ordering of msix irqs.

On Thu, 24 May 2007 15:08:21 -0600
ebiederm@...ssion.com (Eric W. Biederman) wrote:

> Yours looks more complete then my test patch so:
> 
> From: "Mike Miller (OS Dev)" <mikem@...rdog.cca.cpqcorp.net> writes:
> 
> Found what seems the problem with our vectors being listed backward. In
> drivers/pci/msi.c we should be using list_add_tail rather than list_add to
> preserve the ordering across various kernels. Please consider this for
> inclusion.
> 
> Signed-off-by: "Eric W. Biederman" <ebiederm@...ssion.com>
> 
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index 0e67723..d74975d 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -333,7 +333,7 @@ static int msi_capability_init(struct pci_dev *dev)
>  			msi_mask_bits_reg(pos, is_64bit_address(control)),
>  			maskbits);
>  	}
> -	list_add(&entry->list, &dev->msi_list);
> +	list_add_tail(&entry->list, &dev->msi_list);
>  
>  	/* Configure MSI capability structure */
>  	ret = arch_setup_msi_irqs(dev, 1, PCI_CAP_ID_MSI);
> @@ -404,7 +404,7 @@ static int msix_capability_init(struct pci_dev *dev,
>  		entry->dev = dev;
>  		entry->mask_base = base;
>  
> -		list_add(&entry->list, &dev->msi_list);
> +		list_add_tail(&entry->list, &dev->msi_list);
>  	}
>  
>  	ret = arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSIX);

Is this as fragile as I think it is?  What happens when close+open and
rmmod+modprobe happen?  The list gets reordered then?

If this is important then perhaps a big-fat-comment which explains wtf is
going on is needed?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ