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: <52F886ED.7040603@huawei.com>
Date:	Mon, 10 Feb 2014 15:59:41 +0800
From:	Yijing Wang <wangyijing@...wei.com>
To:	Oliver Neukum <oneukum@...e.de>
CC:	Bjorn Helgaas <bhelgaas@...gle.com>,
	<linux-kernel@...r.kernel.org>, <linux-pci@...r.kernel.org>,
	Hanjun Guo <guohanjun@...wei.com>
Subject: Re: [PATCH part1 v5 5/7] PCI: Add pci_dummy_ops to isolate pci device
 temporarily

Hi Oliver,
   Thanks for your review and comments!

>> +static DEFINE_SPINLOCK(pci_freeze_lock);
> 
> The lock is used only here.

Also be used in pci_bus_unfreeze_device();

> 
>> +/**
>> + * pci_bus_freeze_device - freeze pci bus to access pci device
>> + * @bus: the pci bus to freeze
>> + *
>> + * Replace pci bus ops by pci_dummy_ops, protect system from
>> + * accessing pci devices.
>> + */
>> +void pci_bus_freeze_device(struct pci_bus *bus)
>> +{
>> +	struct pci_ops *ops;
>> +	unsigned long flags;
>> +
>> +	spin_lock_irqsave(&pci_freeze_lock, flags);
>> +	ops = pci_bus_set_ops(bus, &pci_dummy_ops);
>> +	bus->save_ops = ops;
>> +	spin_unlock_irqrestore(&pci_freeze_lock, flags);
> 
> Against what exactly are you locking here?

I want to use this spin lock to serialize freeze device and unfreeze device.

Thanks!
Yijing.
> 
> 
> 
> 


-- 
Thanks!
Yijing

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