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:	Mon, 22 Aug 2011 13:24:59 +0100
From:	Martyn Welch <martyn.welch@...com>
To:	"Emilio G. Cota" <cota@...ap.org>
CC:	Manohar Vanga <manohar.vanga@...n.ch>, gregkh@...e.de,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/5] staging: vme: add functions for bridge module refcounting

On 13/08/11 08:47, Emilio G. Cota wrote:
> On Fri, Aug 12, 2011 at 12:30:49 +0200, Manohar Vanga wrote:
>> +	struct vme_bridge *bridge;
>> +
>> +	mutex_lock(&vme_buses_lock);
>> +	list_for_each_entry(bridge, &vme_bus_list, bus_list) {
>> +		if (bridge->num == bus_id) {
>> +			if (!bridge->owner)
>> +				dev_warn(bridge->parent,
>> +					"bridge->owner not set\n");
> 
> Don't do this; it will throw a false warning if the kernel is
> built without module support. Note that in that case
> 
> 	THIS_MODULE == (struct module *)0.
> 
> try_module_get() and module_put() do the right thing for all
> possible configs. Trust them.
> 

I can confirm that this does break when the bridge is compiled into the kernel.

Martyn

-- 
Martyn Welch (Principal Software Engineer) | Registered in England and
GE Intelligent Platforms                   | Wales (3828642) at 100
T +44(0)1327322748                         | Barbirolli Square, Manchester,
E martyn.welch@...com                      | M2 3AB  VAT:GB 927559189
--
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