Commit Graph

7885 Commits

Author SHA1 Message Date
dholland
8225acd644 Revert previous, it breaks nullfs. (And I guess there are no tests for
nullfs?)
2011-08-10 05:42:32 +00:00
dholland
9c377dcfe1 Fail namei immediately if searchdir is unlinked / has been rmdir'd.
Do this by checking if v_size == 0. Should fix PR 44658 (and PR 32661).
2011-08-09 23:46:05 +00:00
dholland
8d4d585132 Include missing part of previous commit to this file. (sigh) 2011-08-09 23:16:17 +00:00
dyoung
e04563cb82 Correct a comment on config_found_sm_loc(). 2011-08-09 21:07:14 +00:00
dholland
943b2f8eb3 Simplify handling of slashes. Provides a proper fix for PR 44961. 2011-08-09 18:37:56 +00:00
hannken
d5d9d4928f No need to lock the selcluster in selscan() if either
NO_DIRECT_SELECT is defined or all polls return an event.
2011-08-09 06:36:51 +00:00
dyoung
f77a583767 Miscellaneous mbuf changes:
1 Add some protection against double-freeing mbufs in DIAGNOSTIC kernels.

2 Add a m_defrag() that's derived from
  sys/dev/pci/if_vge.c:vge_m_defrag().  This one copies the packet
  header.

3 Constify m_tag_find().
2011-08-08 19:10:33 +00:00
manu
c817bc5d19 regen 2011-08-08 12:17:27 +00:00
manu
9db30be448 First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.

Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.
2011-08-08 12:08:52 +00:00
enami
a154f93a37 Bounds process's stack size with max_stack_size so that 32bit
binary works regardless of stack size limit setting.
2011-08-08 06:30:43 +00:00
rmind
e71c0035e7 - Add an argument to kcpuset_create() for zeroing.
- Add kcpuset_atomic_set(), kcpuset_atomic_clear() and kcpuset_merge().
2011-08-07 21:38:32 +00:00
rmind
501dd321fb Remove LW_AFFINITY flag and fix some bugs affinity mask handling. 2011-08-07 21:13:05 +00:00
rmind
a0ffc02ab8 Rename slightly misleading KTHREAD_JOINABLE to KTHREAD_MUSTJOIN. 2011-08-07 14:03:15 +00:00
rmind
52b220e91d Add kcpuset(9) - a reworked dynamic CPU set implementation for kernel.
Suitable for use during the early boot.  MD and other implementations
should be replaced with this interface.

Discussed on: tech-kern@
2011-08-07 13:33:01 +00:00
hannken
7403908422 Fix the races of direct select()/poll():
- When sel_do_scan() restarts do a full initialization with selclear() so
  we start from an empty set without registered events.  Defer the
  evaluation of l_selret after selclear() and add the count of direct events
  to the count of events.

- For selscan()/pollscan() zero the output descriptors before we poll and
  for selscan() take the sc_lock before we change them.

- Change sel_setevents() to not count events already set.

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>

Should fix PR #44763 (select/poll direct-set optimization seems racy)
       and PR #45187 (select(2) sometimes doesn't wakeup)
2011-08-06 11:04:25 +00:00
mbalmer
d1912e7839 Do not not look for modules in the current working directory first. This is
to prevent from accidentally loading ./module.kmod when we actually wanted to
load module from the system module area.

To load a module from a filesystem path, the module name must contain at
least on path separator character (/), to load a module from the system
module areas, the name must not contain a path separator character:

modload ./mymod.kmod      # loads mymod.kmod from the curren directory
modload mymod             # loads mymod.kmod from the system module area
2011-08-06 08:11:09 +00:00
jmcneill
b993a69649 Re-add include of "drvctl.h", as its removal a year and a half ago broke
drvctl DRVGETEVENT.
2011-08-02 21:23:24 +00:00
christos
3bcfc66d27 Add SuSE note 2011-08-02 16:44:01 +00:00
he
7508af7127 Need to include <sys/evcnt.h> explicitly to build this on at least amiga. 2011-08-01 15:26:31 +00:00
drochner
ee07511cd0 modify parsing of device names so that it can deal with names which
have numbers is it, eg "i915drm*"
2011-08-01 10:33:26 +00:00
uebayasi
7a93829794 Revert previous; s/kmem(9)/uvm_km(9)/ and comment why done so. Per request
from rmind@.
2011-07-31 13:41:30 +00:00
christos
44968cba76 Add an implementation of passive serialization as described in expired
US patent 4809168. This is a reader / writer synchronization mechanism,
designed for lock-less read operations.
2011-07-30 17:01:04 +00:00
jmcneill
d2b1c474ba Add an FSILENT flag and use it to suppress "Medium Not Present" scsipi
spam when trying to access offline drives at boot.
2011-07-30 12:08:36 +00:00
uebayasi
4d58dccaac Correct sizes to pass uvm_km_free(9) in error paths. 2011-07-30 06:19:02 +00:00
uebayasi
2eba9539a6 Use kmem(9) to allocate per-cpu softint context. No functional changes. 2011-07-30 05:24:16 +00:00
uebayasi
3abce800c0 Define SYMTAB_SPACE in opt_ksyms.h, not opt_ddbparam.h. Ensure
that ddb(4) code is independent of SYMTAB_SPACE value.
2011-07-28 13:42:16 +00:00
uebayasi
2de1fdfe8b These don't need uvm/uvm_extern.h. 2011-07-27 14:35:33 +00:00
uebayasi
bf4e691e73 Include uvm/uvm_extern.h only once. 2011-07-27 13:45:49 +00:00
yamt
cd31d483de sigpost: don't interfere coredump. PR/45032 2011-07-26 13:33:43 +00:00
yamt
1adcac88c1 stop using lbolt in tty 2011-07-26 13:14:17 +00:00
yamt
e2fcae61c5 comments. related to PR/44969 2011-07-26 13:09:11 +00:00
yamt
9d109b3018 try to fill ld_locked/ld_unlocked for shared acquisition of lock 2011-07-26 13:07:20 +00:00
yamt
04c3ad9fba sleepq_insert: call lwp_eprio only when necessary 2011-07-26 13:04:51 +00:00
yamt
b6608b64ad assertion 2011-07-26 13:03:57 +00:00
martin
d43085eb02 Make sure to not overwrite error if it already is EEXISTS - hopefully
will fix > 100 failing fs tests in my last test run.
2011-07-24 09:40:10 +00:00
jym
1e8ddd07b6 When KERN_SA is not defined, kern.no_sa_support is a constant (1). So
add CTLFLAG_IMMEDIATE to flags. Make the macro block logically reversed so
it looks more natural when reading.

Reported by Peter Tworek on tech-kern@.
2011-07-23 11:38:28 +00:00
manu
8bacaec3f4 Add tracepoints for extended attribute names and values, so that
we can figure what is going on when looking at a ktrace output.
2011-07-22 12:46:18 +00:00
christos
442d0c330c don't produce diagnostics for GNU tags 2011-07-19 19:45:36 +00:00
drochner
3c39863810 regen after *setxattr constification 2011-07-18 11:43:53 +00:00
drochner
2ac9241da8 make the data arguments of *setxattr(2) const, as in Linux
(is this an official NetBSD API or should it be COMPAT_LINUX only?)
2011-07-18 11:28:24 +00:00
joerg
3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
christos
dc72548dbe fail with EINVAL if flags not are not O_CLOEXEC|O_NONBLOCK in pipe2(2) and
dup3(2)
2011-07-15 14:50:19 +00:00
hannken
49511bba25 Change VOP_BWRITE() to take a vnode as its first argument like all other
VOPs do.  Layered file systems no longer have to modify bp->b_vp and run
into trouble when an async VOP_BWRITE() uses the wrong vnode.

- change all occurences of VOP_BWRITE(bp) to VOP_BWRITE(bp->b_vp, bp).
- remove layer_bwrite().
- welcome to 5.99.55

Adresses PR kern/38762 panic: vwakeup: neg numoutput

No objections from tech-kern@.
2011-07-11 08:27:37 +00:00
hannken
4094bb1a9f Change VOP_BWRITE() to take a vnode as its first argument like all other
VOPs do.  Layered file systems no longer have to modify bp->b_vp and run
into trouble when an async VOP_BWRITE() uses the wrong vnode.

Adresses PR kern/38762 panic: vwakeup: neg numoutput

No objections from tech-kern@.
2011-07-11 08:23:00 +00:00
mrg
bc7506b1cc avoid some uninitialised variable warnings. 2011-07-08 09:32:45 +00:00
dyoung
22c58b4530 Add default implementations for new bus_space(9) routines. 2011-07-06 18:24:26 +00:00
manu
be95d60797 Add a flag to VOP_LISTEXTATTR(9) so that the vnode interface can tell the
filesystem in which format extended attribute shall be listed.

There are currently two formats:
- NUL-terminated strings, used for listxattr(2), this is the default.
- one byte length-pprefixed, non NUL-terminated strings, used for
  extattr_list_file(2), which is obtanined by setting the
  EXTATTR_LIST_PREFIXLEN flag to VOP_LISTEXTATTR(9)

This approach avoid the need for converting the list back and forth, except
in libperfuse, since FUSE uses NUL-terminated strings, and the kernel may
have requested EXTATTR_LIST_PREFIXLEN.
2011-07-04 08:07:29 +00:00
hannken
3e2f3eaf50 Return EINVAL when trying to create a device node with "rdev == VNOVAL".
Fixes PR #45111 "tmpfs panic with mknod(2)".
2011-07-03 15:25:09 +00:00
mrg
2624874e7c avoid some uninitialised variable warnings from GCC.
at least the puffs one seems valid, but i'm not 100% sure.
2011-07-03 08:57:43 +00:00
bouyer
1f1772a97c Fix kern/45093 as discussed on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2011/06/17/msg010734.html

The cause of the problem is that the so_pendfree is processed with
the softnet_lock held at one point, and processing the list
calls sodoloanfree() which may kpause(). As the thread sleeps with
softnet_lock held, it ultimately cause a deadlock (see the PR or tech-kern
thread for details).
Although it should be possible to call sodopendfree() after releasing
the socket lock, it's not so easy to know where he socket lock is held and
where it's not, so we may hit the issue again later.
Add a kernel thread to handle the so_pendfree list, and wake up this
thread when adding mbufs to this list. Get rid of the various sodopendfree()
calls, hopefully fixing definitively the problem.
2011-07-02 17:53:50 +00:00