Age | Commit message (Collapse) | Author |
|
There used to be a predefined null vattr for !DIAGNOSTIC
but that was removed in vnode.h rev 1.84 in 2007.
ok semarie@ miod@
|
|
ok mpi@ miod@
|
|
defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
as they won't be used otherwise.
Shaves a few bytes off installation kernels.
ok kn@ semarie@
|
|
|
|
character. The '/' char is the path separator and is not allowed in
any filename.
NFS specific report by Apple Security Engineering and Architecture (SEAR).
Input from guenther@ and millert@
OK beck@ miod@
|
|
Only do this if struct nfsm_info doesn't have local scope.
In some cases the caller would perfrom another m_freem and double free
the mbuf and Bad Things(TM) would happen.
Reported by Claes M Nyberg on bugs@; with & ok miod@
|
|
consider as not tragic enough to abort the operation, in order to batch error
replies.
This would end up invoking nfs_namei() using an uninitialized variable as
length, and Bad Things(TM) would happen.
Reported by Claes M Nyberg on bugs@; tweaks & ok claudio@
|
|
saves space on ramdisks that have option NFSCLIENT
initial diff from and ok miod@
|
|
Input and ok jmc@, jsg@
|
|
some functions have a nfsmout label with code that assumes NDINIT has
been called
nfsrv_rename has two NDINIT calls, the nfsmout code assumes both are
setup but is only jumped to when none/one is setup
found with llvm scan-build
checked by deraadt@ beck@, ok miod@
|
|
udp_send() and following udp{,6}_output() do not append packets to
`so_snd' socket buffer. This mean the sosend() and sosplice() sending
paths are dummy pru_send() and there is no problems to simultaneously
run them on the same socket.
Push shared solock() deep down to sesend() and take it only around
pru_send(), but keep somove() running unedr exclusive solock(). Since
sosend() doesn't modify `so_snd' the unlocked `so_snd' space checks
within somove() are safe. Corresponding `sb_state' and `sb_flags'
modifications are protected by `sb_mtx' mutex(9).
Tested and OK bluhm.
|
|
ok miod@ mlarkin@
|
|
ok mglocker@
|
|
nfs_getreq() is in nfs_socket.c and not called from nfs_vnops.c
|
|
while here, ensure all vop_remove field are set, and always call the function.
the change is very conservative: it only adds vnode ref drop/unlock where it was
absent because it should be unreachable (and if it wasn't, it should fix
things).
ok miod@
|
|
|
|
|
|
ok miod@
|
|
ok miod@ mpi@
|
|
This is a no-op since we only care about the low 12 bits in NFS anyway.
ok jsg@ semarie@
|
|
ok jsg@ semarie@
|
|
appropriate extra arguments.
This (hopefully) completes the unmessyfication work started by thib@ a long,
long time ago (in a galaxy far away).
The conversion logic has been:
- nfsm_dissect has been turned into an rvalue expression, leaving the
cast operation up to its caller.
- macros which had three different exit paths (return, goto nfsmout or
fallthrough) have been split so that no macros have more than two exit paths.
- then they have been modified to return a value, which lets the caller
figure out what exit path is needed.
- local variables abused by the macros are now local variables of the new
inline functions.
This single commit is the sum of 25 intermediate diffs, which have all been
carefully reviewed by (at least) jsg@ and semarie@.
Tested with v2 and v3 servers and clients.
ok jsg@ semarie@
|
|
platforms.)
ok mpi@
|
|
Unfortunately, this is recommended by rfc 2623 and used by Linux
nfs-utils to mount NFS exports. So until nfs-utils switches into
using reserved ports, this is needed to mount OpenBSD file-systems
on most (all?) Linux distros.
Bits from claudio, ok millert
|
|
no functional change, found by smatch warnings
ok miod@ bluhm@
|
|
sbappend*() and soreceive() of SB_MTXLOCK marked sockets uses `sb_mtx'
mutex(9) for protection, meanwhile buffer usage check and corresponding
sbwait() sleep still serialized by solock(). Mark udp(4) as SB_OWNLOCK
to avoid solock() serialization and rely to `sb_mtx' mutex(9). The
`sb_state' and `sb_flags' modifications must be protected by `sb_mtx'
too.
ok bluhm
|
|
checks from all the filesystems that support hardlinks at all into
the VFS layer. Simplify, EPERM description in link(2).
ok miod@ mpi@
|
|
For TCP connections do the check when adding the socket via nfssvc(2).
For UDP do the check early after soreceive().
On top of this limit the sockets added via nfssvc(2) to IPv4 TCP and UDP
sockets.
OK millert@ deraadt@
|
|
solock() is still held because other 'sockbuf' members require it, but
in so{g,s}etopt() paths solock() is avoided.
ok bluhm
|
|
If the server doesn't close the socket immediately and starts waiting
for the client to reconnect, then the TCP connection will remain open.
The client will have to wait for the connection to be closed in order
to reconnect with the same source port; this never happens, resulting
in a freeze until the file system is umounted.
This change fixes Linux NFS clients freezing after 5 min of inactivity.
ok miod, help from claudio
|
|
mechanical 'selinfo' to 'klist' replacement in 'vnode' structure because
knote(9) API is already used.
<sys/selinfo.h> headers added where is was required.
ok bluhm
|
|
This movement required because buffers related SO_SND* and SO_RCV*
socket options should be protected with sblock(). However, standalone
sblock() has different lock order with solock() and `so_snd' and
`so_rcv' buffers. At least sblock() for `so_snd' buffer will always be
taken before solock() in the sosend() path.
The (*pr_ctloutput)() call was removed from the SOL_SOCKET level 'else'
branch. Except the SO_RTABLE case where it handled in the special way,
this is null op call.
For SO_SND* and SO_RCV* cases solock() will be replaced by sblock() in
the future.
Feedback from bluhm
Tested by bluhm naddy
ok bluhm
|
|
noticed by miod@
ok kettenis@
|
|
ok claudio@ kettenis@
|
|
ok miod@ millert@
|
|
This is helpful for the following (*pr_usrreq)() split to multiple
handlers. But right now this makes code more readable.
Also add '#ifndef _SYS_SOCKETVAR_H_' to sys/socketvar.h. This prevents the
collisions when both sys/protosw.h and sys/socketvar.h are included
together. Both 'socket' and 'protosw' structures are required to be
defined before pru_*() wrappers, so we need to include sys/socketvar.h to
sys/protosw.h.
ok bluhm@
|
|
Buffer cache related struct vnode fields can be accessed in interrupt
context. Be more consistent with the use of splbio().
OK mpi@
|
|
Make the silly file removal happen after the vnode has been unlocked.
This avoids a file-directory reversal in the vnode locking order.
OK jca@
|
|
OK mpi@
|
|
for the lock operation and to pass a value to the unlock operation.
sofree() still needs an extra flag to know if sounlock() should be called
or not. But sofree() is called less often and mostly without keeping the lock.
OK mpi@ mvs@
|
|
ok kettenis@
|
|
Tested in snaps for a week.
OK bluhm@
|
|
OK bluhm@
|
|
no binary change
|
|
net/if_pppx.c pointed out by jsg@
ok gnezdo@ deraadt@ jsg@ mpi@ millert@
|
|
OK stsp@ (without assuming any responsibility for NFS)
|
|
ok jmc@
|
|
Pass the device vnode as a parameter to VOP_STRATEGY() to allow calling
the correct vop_strategy callback. Now the vnode is also available
in the callback.
OK mpi@
|
|
Make __EV_POLL specific to kqueue-based poll(2), to remove overlap
with __EV_SELECT that only select(2) uses.
OK millert@ mpi@
|
|
(both kernel and userland bits)
GENERIC + VFSLCKDEBUG is broken with it.
|