freebsd-dev/sys
Bill Paul 0932a90b65 Close out PR #507 (loading LM_MISC pseudo-lkms twice crashes system).
For the LKM_E_LOAD case of the DISPATCH() macro, use lkmexists() to
make sure we don't have another instance the module we're trying to
load already loaded _before_ calling the module's load() function.
If lkmexists() returns true, return EEXIST without trying to load
the module.

For most types of modules, the individual dispatch functions in the
kernel check for duplicated modules, but for LM_MISC we can't trust
the module to do the checks itself. Currently, the kernel does
do an lkmexists() check on LM_MISC modules, but not until after
the module's load() function has been called, which is too late
for it to do any good. If the load() function does irreversible
things to the kernel, the belated lkmexists() check forces an
unload() and a crash.
1995-06-17 05:02:30 +00:00
..
alpha/include Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
amd64 Convert to ANSI C: change #endif THING to #endif /* THING */. 1995-06-14 07:38:31 +00:00
compile
conf Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
ddb Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
dev Next version, many bugs fixed 1995-06-14 19:37:02 +00:00
fs Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
gnu Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
i386 Next version, many bugs fixed 1995-06-14 19:37:02 +00:00
isa Don't convert \n to \r\n in pccnputc(). This is the responsibility of 1995-06-14 05:16:12 +00:00
isofs/cd9660 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
kern Optimized and simplified version of setreuid/gid 1995-06-15 22:32:03 +00:00
libkern Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
miscfs Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
modules I was wrong. I thought that the ip_mroute lkm would still compile, but it 1995-06-13 20:51:13 +00:00
msdosfs Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
net Give the BPF the ability to generate signals when a packet is available. 1995-06-15 18:11:00 +00:00
netccitt Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
netinet Kernel side of 3.5 multicast routing code, based on work by Bill Fenner 1995-06-13 17:51:16 +00:00
netiso Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
netns Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
nfs The duplicate information returned in fa_type and fa_mode 1995-06-14 06:23:38 +00:00
nfsclient The duplicate information returned in fa_type and fa_mode 1995-06-14 06:23:38 +00:00
nfsserver The duplicate information returned in fa_type and fa_mode 1995-06-14 06:23:38 +00:00
pci Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
powerpc/include Don't define CLK_TCK here. 1995-02-03 21:49:18 +00:00
rpc Remove trailing whitespace. 1995-05-30 05:05:38 +00:00
scsi Bestmatch check for cd-drive always faild due to additional space 1995-06-14 12:28:32 +00:00
sys Close out PR #507 (loading LM_MISC pseudo-lkms twice crashes system). 1995-06-17 05:02:30 +00:00
tools
ufs Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
vm Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
Makefile