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
| ||
|
Date: Mon, 16 Jul 2007 14:22:53 +0100 From: Robert Beckett <bob.beckett@...il.com> To: linux-kernel@...r.kernel.org Subject: try_module_get question Hi all, Im a newcomer to kernel development, and have my first question : I want to create a small module that simply powers on an FPGA, and powers it off when it is released. Two other modules will then depend on this module and control different devices programmed into the FPGA. So that the shared module does not get removed before any of the device drivers, I want to do a try_module_get from each driver targeting the shared module. What is the easiest way to get a reference to the shared module? My current thought is to export a function that will return a reference to it (using THIS_MODULE from the shared module). The device driver modules can then try_module_get the returned module. Is this the best way to do this? Is there an alternative way? maybe based on a similar system to the device / driver matching code? There seem to be a lot of FAQs online saying that you need to get and put a module before calling any function that may stall for example, but they dont tell you how to get the module reference to use. Or am I just missing something obvious? Thanks Robert Beckett. - 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