diff options
author | sam <sam@FreeBSD.org> | 2003-11-07 22:57:09 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-11-07 22:57:09 +0000 |
commit | 3eac15aaa3639582c3322e6618f161330a3cd761 (patch) | |
tree | 155ef0fdfb8e324ae21ca64209357e0bad83e00e /sys/nfsclient/nfs_socket.c | |
parent | 866f946f371c2b4d26a0fe2566bc63f5245ddb2e (diff) | |
download | FreeBSD-src-3eac15aaa3639582c3322e6618f161330a3cd761.zip FreeBSD-src-3eac15aaa3639582c3322e6618f161330a3cd761.tar.gz |
Assert GIANT_REQUIRED where sockets are manipulated. This is
preparatory for MPSAFE network commits and ongoing socket
locking work.
Supported by: FreeBSD Foundation
Diffstat (limited to 'sys/nfsclient/nfs_socket.c')
-rw-r--r-- | sys/nfsclient/nfs_socket.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c index 43c28d3..9c82759 100644 --- a/sys/nfsclient/nfs_socket.c +++ b/sys/nfsclient/nfs_socket.c @@ -161,6 +161,8 @@ nfs_connect(struct nfsmount *nmp, struct nfsreq *rep) struct sockaddr *saddr; struct thread *td = &thread0; /* only used for socreate and sobind */ + GIANT_REQUIRED; /* XXX until socket locking done */ + nmp->nm_so = NULL; saddr = nmp->nm_nam; error = socreate(saddr->sa_family, &nmp->nm_so, nmp->nm_sotype, @@ -377,6 +379,8 @@ nfs_disconnect(struct nfsmount *nmp) { struct socket *so; + GIANT_REQUIRED; /* XXX until socket locking done */ + if (nmp->nm_so) { so = nmp->nm_so; nmp->nm_so = NULL; @@ -411,6 +415,8 @@ nfs_send(struct socket *so, struct sockaddr *nam, struct mbuf *top, struct sockaddr *sendnam; int error, soflags, flags; + GIANT_REQUIRED; /* XXX until socket locking done */ + KASSERT(rep, ("nfs_send: called with rep == NULL")); if (rep->r_flags & R_SOFTTERM) { @@ -484,6 +490,8 @@ nfs_receive(struct nfsreq *rep, struct sockaddr **aname, struct mbuf **mp) int error, sotype, rcvflg; struct thread *td = curthread; /* XXX */ + GIANT_REQUIRED; /* XXX until socket locking done */ + /* * Set up arguments for soreceive() */ |