summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Replace ffind_* with fget calls.alfred2002-01-1422-230/+136
| | | | | | | | Make fget MPsafe. Make fgetvp and fgetsock use the fget subsystem to reduce code bloat. Push giant down in fpathconf().
* Add parens around macro args.alfred2002-01-131-4/+4
| | | | Forgotten by: dillon
* remove unused socket pointeralfred2002-01-131-1/+0
|
* Include sys/_lock.h and sys/_mutex.h to reduce namespace pollution.alfred2002-01-1318-30/+49
| | | | Requested by: jhb
* o Call the functions registered with at_exec() from exec_new_vmspace()alc2002-01-131-4/+7
| | | | | | | instead of execve(). Otherwise, the possibility still exists for a pending AIO to modify the new address space. Reviewed by: alfred
* Make call_desc[] extern since it's also defined in layer4/i4b_l4mgmt.cgj2002-01-131-1/+2
| | | | | | | | | | which was causing the link of the kernel to fail. Since layer4/i4b_l4mgmt.c is always required by i4b and layer3/i4b_q931.c is only needed when a passive card is present it makes sense to have the declaration in the former file only. No MFC required since the problem only became apparent after a change to the compile options in -current which AFAIK wasn't made in -stable.
* Remove unused variable.alfred2002-01-131-1/+0
|
* Comment fdrop and fdrop_locked functions.alfred2002-01-131-0/+9
|
* Implement ffind_hold using ffind_lock.alfred2002-01-131-11/+3
| | | | Recommended by: jhb
* Some of the KSE stuff was accidentally reverted by file locking,alfred2002-01-131-5/+5
| | | | | | fix it. Pointed out by: jhb
* Remove file locking debug cruft.alfred2002-01-132-28/+0
|
* SMP Lock struct file, filedesc and the global file list.alfred2002-01-1349-541/+1624
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seigo Tanimura (tanimura) posted the initial delta. I've polished it quite a bit reducing the need for locking and adapting it for KSE. Locks: 1 mutex in each filedesc protects all the fields. protects "struct file" initialization, while a struct file is being changed from &badfileops -> &pipeops or something the filedesc should be locked. 1 mutex in each struct file protects the refcount fields. doesn't protect anything else. the flags used for garbage collection have been moved to f_gcflag which was the FILLER short, this doesn't need locking because the garbage collection is a single threaded container. could likely be made to use a pool mutex. 1 sx lock for the global filelist. struct file * fhold(struct file *fp); /* increments reference count on a file */ struct file * fhold_locked(struct file *fp); /* like fhold but expects file to locked */ struct file * ffind_hold(struct thread *, int fd); /* finds the struct file in thread, adds one reference and returns it unlocked */ struct file * ffind_lock(struct thread *, int fd); /* ffind_hold, but returns file locked */ I still have to smp-safe the fget cruft, I'll get to that asap.
* It is required by VOP_CREATE, VOP_MKNOD, VOP_SYMLINK and VOP_MKDIRiedowse2002-01-131-3/+9
| | | | | | | | | | | | | | | | that va_mode of the supplied attributes is filled in with a valid file mode (i.e not VNOVAL, and only ALLPERM bits set). However, some NFS server op functions didn't guarantee this for all possible request messages: If a V3 client chose not include to a mode specification, we could end up creating an ffs inode with mode 0177777, requiring a manual fsck on the next reboot. Fix this by setting va_mode to 0 before calling the VOP if a mode hasn't been supplied by the client. In nfsrv_symlink(), S_IFMT bits supplied by a V2 client could end up in the va_mode passed to VOP_SYMLINK with similar effects. We now use the macro nfstov_mode() to correctly mask the bits.
* Add support for newer integrated SiS 900 controllers on the 635 and 735wpaul2002-01-122-5/+54
| | | | | | | motherboard chipsets. We need to force the chip to reload its MAC address into the receive filter, and enable software access mode for the PHY. PR: kern/33294
* When going to sleep, we must save our SPL so that it does not getmckusick2002-01-121-38/+76
| | | | | | | | | | lost if some other process uses the lock while we are sleeping. We restore it after we have slept. This functionality is provided by a new routine interlocked_sleep() that wraps the interlocking with functions that sleep. This function is then used in place of the old ACQUIRE_LOCK_INTERLOCKED() and FREE_LOCK_INTERLOCKED() macros. Submitted by: Debbie Chu <dchu@juniper.net>
* Export "ng_ether_enaddr_type" because the ng_bridge type uses it.archie2002-01-121-0/+2
|
* Fix a few NFSv2 issues that slipped in during the big cleanup. Theiedowse2002-01-121-33/+28
| | | | | | | | | | | | | | semantics of the nfsm_reply() macro were changed so that the caller has to explicitly handle the V2 error case, whereas before, nfsm_reply() did a `goto nfsmout' then. A few server ops (setattr, readlink, create, mkdir) weren't updated to match, so errors in the V2 case could cause protocol hangs and leaked mbufs. Correct some comments that describe the old nfsm_reply behaviour. [older, harmless nit] Remove the unnecessary `nfsmreply0' label in nfsrv_create(), since for its users, the main `ereply' label does the same thing.
* Fix typo so that the delay code introduced in revision 1.60 actuallymckusick2002-01-121-1/+1
| | | | | | does something. Submitted by: John Baldwin <john@baldwin.cx>
* Add missing move of relative offset for CTIO2 updates.mjacob2002-01-111-0/+1
|
* The macro nfsm_reply() is supposed to allocate a reply in all cases,iedowse2002-01-111-2/+2
| | | | | | | | | | | | | but since the nfs cleanup, it hasn't done so in the case where `error' is EBADRPC. Callers of this macro expect it to initialise *mrq, and the `nfsmout' exit point expects a reply to be allocated if error == 0. When nfsm_reply() was called with error = EBADRPC, whatever junk was in *mrq (often a stale pointer to an old reply mbuf) would be assumed to be a valid reply and passed to pru_sosend(), causing a crash sooner or later. Fix this by allocating a reply even in the EBADRPC case like we used to do. This bug was specific to -current.
* I don't think that these modules should export symbols at all. Allimp2002-01-113-6/+0
| | | | | | | | intermodule communication is done via kobj calls. If anything currently depends on them, let it break so that we can fix it. Maybe we'll need to export some of the card_if.c or power_if.c symbols, but I think those should be in the base kernel (since all *_if.c should be in the base kernel for just these reasons).
* Must call drain_output() before checking the dirty block listmckusick2002-01-111-8/+10
| | | | | | | | | in softdep_sync_metadata(). Otherwise we may miss dependencies that need to be flushed which will result in a later panic with the message ``vinvalbuf: dirty bufs''. Submitted by: Matthew Dillon <dillon@apollo.backplane.com> MFC after: 1 week
* Fixed some style bugs (disordered SRCS and garbage comment near EOF).bde2002-01-111-2/+1
|
* Make the alpha boot1 work on filesystems that have a block sizeiedowse2002-01-111-24/+41
| | | | | | | | | | | larger than 8k. We now use 4k buffers regardless of the filesystem block size, so there is no longer a static limit. Simply increasing the buffer size from 8k to 16k as done on the i386 doesn't work on the alpha, probably because it causes us to overshoot boot1's 48k runtime memory limit. Tested by: naddy
* It turns out that when a broadcast packet is looped back, the checksumsjesper2002-01-111-0/+13
| | | | | | | | | | | | are checked on the way in even if they were not calculated on the way out. This fixes rwhod PR: 31954 Submitted by: fenner Approved by: fenner MFC after: 1 week
* Drop <bsd.man.mk> support from <bsd.kmod.mk>.ru2002-01-11114-135/+2
| | | | Not objected to by: -current
* Fix a panic condition in icmp_reflect() introduced in rev. 1.61.ru2002-01-111-2/+2
| | | | | | | | | | (We should be able to handle locally originated IP packets, and these do not have m_pkthdr.rcvif set.) PR: kern/32806, kern/33766 Reviewed by: luigi Fix tested by: Maxim Konovalov <maxim@macomnet.ru>, Erwin Lansing <erwin@lansing.dk>
* Add missing prototype for pmap_unmapdev().jhb2002-01-111-0/+1
|
* genassym builds need the -fno-common stripped out.peter2002-01-113-5/+5
|
* Export cd9660_wchar2char symbol, because we need it in the pluggablesobomax2002-01-111-0/+1
| | | | unicode decoding klds (cd9660_unicode port).
* Turn on unconditional symbol export for modules whose API ismsmith2002-01-1110-0/+20
| | | | | not clear enough, will require additional analysis, or will require some input from their maintainers.
* Export symbols that constitute APIs defined by thesemsmith2002-01-1115-0/+142
| | | | | | | | modules. Note that in the case of 'mii' the API is not clearly defined, and the symbols exported represent a subset defined by current usage.
* Reverse the sense of EXPORT_SYMS. If EXPORT_SYMS is notmsmith2002-01-111-4/+7
| | | | | | | | | | defined, no symbols are exported from the module. This is the typical configuration for most device drivers and standalone modules; only infrastructure modules or those with special requirements typically need to export symbols. Don't print the objcopy commands as they are run when converting symbols; they're bulky and annoying in many cases.
* Catch the netboot version up to the main loader. This is pretty bogus.jhb2002-01-111-0/+5
| | | | | | | | All the alpha loaders should use the same version file. Also, we might should merge the various loaders (cdboot, loader, netboot) into one loader that can boot off of disks, CD's, and network devices. The version bump is needed so the FICL scripts won't bomb out thinking that the netboot binary is too old.
* Unrevert revision 1.12. Revision 1.14 backed this out saying it wasjhb2002-01-101-7/+17
| | | | | | | backing out the 1024 sector boot0, but revision 1.12 had nothing to do with that. Instead, it documented various compile time options for boot0 and allowed them to be overridden via make.conf or options on the make command line.
* Add vlruvp() routine - implements LRU operation for vnode recycling.dillon2002-01-101-0/+46
| | | | | | | | We calculate a trigger point that both guarentees we will find a sufficient number of vnodes to recycle and prevents us from recycling vnodes with lots of resident pages. This particular section of code is designed to recycle vnodes, not do unnecessary frees of cached VM pages.
* Fix reversed definitions for the bits that select half vs. full duplex.archie2002-01-101-4/+4
| | | | Submitted by: Darren Croke <djc@packetdesign.com>
* Do not pull quota entries of the cache-list if they have alreadyphk2002-01-101-1/+2
| | | | | | | | | | | | | been removed from the cache-list as part of a previous unmount. This would result in panics (page fault in dqflush()) during subsequent umounts provided that enough distinct UID's to actually make the hash do something are active. This can probably explain a number of weird quota related behaviours. PR: 32331 maybe more. Reproduced by: Søren Schrørder <sch@cybercity.dk>
* Clear the single-step flag for signal handlers. This fixes bogus tracebde2002-01-108-28/+25
| | | | | | | | | | | | | | | | traps on the first instruction of signal handlers. In trap.c:syscall(), fake a trace trap if the single-step flag was set on entry to the kernel, not if it will be set on exit from the kernel. This fixes bogus trace traps after the last instruction of signal handlers. gdb-4.18 (the version in FreeBSD) still has problems with the program in the PR. These seem to be due to bugs in gdb and not in FreeBSD, and are fixed in gdb-5.1 (the distribution version). PR: 33262 Tested by: k Macy <kip_macy@yahoo.com> MFC after: 1 day
* Back out previous revision, which will be applied directly tosheldonh2002-01-101-1/+0
| | | | the RELENG_4 branch when approved by the release engineers.
* Further fixes related to the interface renaming. Now that wemarcel2002-01-101-52/+12
| | | | | | | | | | | | | | properly translate the interface name passed to us, make sure we also translate correctly before we return the list of interfaces with the SIOCGIFCONF ioctl. It is common to use the interface names returned by that ioctl in further ioctls, such as SIOCGIFFLAGS. Remove linux_ifname as it is no longer used. Also remove ifname_bsd_to_linux as it cannot be used anymore now that linux_ifname is removed (was deadcode anyway). Reported and tested by: Andrew Atrens <atrens@nortelnetworks.com>
* genassym depends on the presence of common variables, disable the usemsmith2002-01-102-2/+2
| | | | of -fno-common in this case.
* Eliminate the use of commons in the kernel and modules,msmith2002-01-104-4/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | simplifying the module linking process and eliminating the risks associated with doubly-defined variables. Cases where commons were legitimately used (detection of compiled-in subsystems) have been converted to use sysinits, and any new code should use this or an equivalent practice as a matter of course. Modules can override this behaviour by substituting -fno-common out of ${CFLAGS} in cases where commons are necessary (eg. third-party object modules). Commons will be resolved and allocated space when the kld is linked as part of the module build process, so they will not pose a risk to the kernel or other modules. Provide a mechanism for controlling the export of symbols from the module namespace. The EXPORT_SYMS variable may be set in the Makefile to NO (export no symbols), a list of symbols to export, or the name of a file containing a newline-seperated list of symbols to be exported. Non-exported symbols are converted to local symbols. If EXPORT_SYMS is not set, all global symbols are currently exported. This behaviour is expected to change (to exporting no symbols) once modules have been converted. Reviewed by: peter (in principle) Obtained from: green (kmod_syms.awk)
* Fix typo in function name.wes2002-01-102-2/+2
| | | | | Reviewed by: peter@ Obtained from: mux@sneakerz.org
* Add getcontext, setcontext, makecontext, and swapcontext prototypesdeischen2002-01-101-0/+7
| | | | | | to ucontext.h. Approved by: -arch
* Use a spare slot in the machine context to identify the context formatdeischen2002-01-102-1/+5
| | | | | | | | | | | and to inherently verify its validity. Alpha signal frames and trap frames are different; this field identifies which format the context is Set the machine context format (signal frame) before copying it out when sending a signal. Approved by: -arch
* Use a spare slot in the machine context for a flags word to indicatedeischen2002-01-104-2/+10
| | | | | | | | | | whether the machine context is valid and whether the FPU state is valid (saved). Mark the machine context valid before copying it out when sending a signal. Approved by: -arch
* Terminate requests in nfs_sigintr() if the filesystem is in theiedowse2002-01-101-1/+4
| | | | | | | | | | | | process of being unmounted. This allows forced NFS unmounts to complete even if there are processes stuck holding the mnt_lock while the server is down. The mechanism is not ideal in that there is a small chance we might accidentally cancel requests during a failed non-forced unmount attempt on that filesystem, but this is not really a big problem. Also, move the tsleep() in nfs_nmcancelreqs() so that we do not sleep in the case where there are no requests to be cancelled.
* Change dounmount() to return EBUSY in the non-MNT_FORCE case if weiedowse2002-01-102-2/+16
| | | | | | | can't acquire the mnt_lock without blocking. Normally non-forced unmount attempts return EBUSY quickly if any vnodes are active, so this just extends that behaviour to cover the per-mount mnt_lock too.
* o Revert kern_sig.c#1.143, as cr_cansignal() doesn't currently permitrwatson2002-01-101-3/+14
| | | | | | | a number of desirable cases in which SIGIO/SIGURG are delivered. We'll keep tweaking. Reported by: Alexander Kabaev <ak03@gte.com>
OpenPOWER on IntegriCloud