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: <460E88D7.3010702@gmail.com>
Date:	Sun, 01 Apr 2007 01:14:15 +0900
From:	Tejun Heo <htejun@...il.com>
To:	Cornelia Huck <cornelia.huck@...ibm.com>
CC:	gregkh@...e.de, hugh@...itas.com, dmitry.torokhov@...il.com,
	oneukum@...e.de, maneesh@...ibm.com, rpurdie@...ys.net,
	James.Bottomley@...elEye.com, Jeff Garzik <jgarzik@...ox.com>,
	lkml <linux-kernel@...r.kernel.org>,
	"linux-ide@...r.kernel.org" <linux-ide@...r.kernel.org>,
	SCSI Mailing List <linux-scsi@...r.kernel.org>
Subject: Re: [RFD driver-core] Lifetime problems of the current driver model

Cornelia Huck wrote:
> On Sat, 31 Mar 2007 12:12:48 +0900,
> Tejun Heo <htejun@...il.com> wrote:
> 
>>> Hm, but as long as dk0 is registered, it can be looked up and someone
>>> could get a reference on it.
>> Yeah, exactly.  That's why any getting any kobject reference backed by a
>> module must be accompanied by try_module_get().
>>
>> int mydrv_get_dk(struct dk *dk)
>> {
>> 	rc = try_module_get(mydrv);
>> 	if (rc)
>> 		return rc;
>> 	kobject_get(&dk->kobj);
>> 	return 0;
>> }
> 
> This works if the caller always knows which module to grab (I was
> thinking about some tree-walking code).

Yeah, that's why we have so many ->owner's and getting it wrong results 
in jumping to non-existent address.

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