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, 03 May 2012 23:46:35 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	"Yan, Zheng" <zheng.z.yan@...el.com>
Cc:	mingo@...e.hu, andi@...stfloor.org, eranian@...gle.com,
	jolsa@...hat.com, ming.m.lin@...el.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/9] perf: Generic pci uncore device support

On Wed, 2012-05-02 at 10:07 +0800, Yan, Zheng wrote:
> +static void __devexit uncore_pci_remove(struct pci_dev *pdev)
> +{
> +       struct intel_uncore_box *box = pci_get_drvdata(pdev);
> +       int phyid = pcibus_to_phyid[pdev->bus->number];
> +
> +       if (WARN_ON_ONCE(phyid != box->phy_id))
> +               return;
> +
> +       box->pci_dev = NULL;
> +       if (--box->refcnt == 0) {

This appears completely unserialized (as is all the refcnt stuff in
patch 4 it seems), now I figure the only way to actually have this pci
device go away is by hotplug, which is serialized. Still looks very odd.

> +               spin_lock(&uncore_pci_lock);
> +               hlist_del_rcu(&box->hlist);
> +               spin_unlock(&uncore_pci_lock);
> +               kfree_rcu(box, rcu_head);
> +       }
> +} 
--
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