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, 19 Mar 2009 11:11:07 -0600
From:	Alex Chiang <achiang@...com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	jbarnes@...tuousgeek.org, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org, Trent Piepho <xyzzy@...akeasy.org>
Subject: Re: [PATCH v4 07/12] PCI: Introduce /sys/bus/pci/rescan

* Andrew Morton <akpm@...ux-foundation.org>:
> On Wed, 18 Mar 2009 16:40:01 -0600 Alex Chiang <achiang@...com> wrote:
> 
> > +#ifdef CONFIG_HOTPLUG
> > +static DEFINE_MUTEX(pci_remove_rescan_mutex);
> > +static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf,
> > +				size_t count)
> > +{
> > +	unsigned long val;
> > +	struct pci_bus *b = NULL;
> > +
> > +	if (strict_strtoul(buf, 0, &val) < 0)
> > +		return -EINVAL;
> > +
> > +	if (!capable(CAP_SYS_ADMIN))
> > +		return -EPERM;
> > +
> > +	if (val) {
> > +		mutex_lock(&pci_remove_rescan_mutex);
> > +		while ((b = pci_find_next_bus(b)) != NULL)
> > +			pci_rescan_bus(b);
> > +		mutex_unlock(&pci_remove_rescan_mutex);
> > +	}
> > +	return count;
> > +}
> > +
> > +struct bus_attribute pci_bus_attrs[] = {
> > +	__ATTR(rescan, S_IWUSR, NULL, bus_rescan_store),
> > +	__ATTR_NULL
> > +};
> > +#endif
> 
> Why CONFIG_HOTPLUG rather than CONFIG_HOTPLUG_PCI (or similar)?

I first started out with CONFIG_HOTPLUG_PCI but then all that
stuff got compiled out, and I couldn't figure out why at the
time.

I'll go back and try and figure out what's really going on. :-/

Thanks.

/ac

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