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]
Message-ID: <CA+55aFz7B5ebEGKKJmvuWY+2O-6qarUj40CHASu_4EQ0KDgi_Q@mail.gmail.com>
Date:	Mon, 23 Jan 2012 08:06:12 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>,
	Matthew Wilcox <matthew@....cx>, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/7] PCI: Make sriov work with hotplug remove

On Sat, Jan 21, 2012 at 1:52 AM, Yinghai Lu <yinghai@...nel.org> wrote:
>
> +       /*
> +        * pci_stop_bus_device(dev) will not remove dev from bus->devices list,
> +        *  so We don't need use _safe version for_each here.
> +        * Also _safe version has problem when pci_stop_bus_device() for PF try
> +        *  to remove VFs.
> +        */
> +       for (l = head->next; l != head;) {

That's crazy. Why would you open-code this? Why isn't it just a
"list_for_each()"?

And what are the problems with the safe version? If the safe version
doesn't work, then something is *seriously* wrong with the list.

> +               struct pci_dev *dev = pci_dev_b(l);
> +
> +               /*
> +                * VFs are removed by pci_remove_bus_device() in the
> +                *  pci_stop_bus_devices() code path for PF.
> +                *  aka, bus->devices get updated in the process.
> +                * barrier() will make sure we get right next from that list.
> +                */
> +               if (!dev->is_virtfn) {
> +                       pci_stop_bus_device(dev);
> +                       barrier();
> +               }

And this is just insanity. The "barrier()" cannot *possibly* do
anything sane. If it really makes a difference, there is again some
serious problem with the whole f*cking thing.

NAK on the patch until sanity is restored. This is just total voodoo
programming.

                            Linus
--
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