Date: Tue, 24 Aug 2004 20:02:50 -0400 (EDT) From: Robert Watson <rwatson@FreeBSD.org> To: Jun Kuriyama <kuriyama@imgsrc.co.jp> Cc: Current <freebsd-current@FreeBSD.org> Subject: Re: suser: thread 0xc06aec80 (0 swapper) != curthread 0xc1ee9420 Message-ID: <Pine.NEB.3.96L.1040824200115.89999G-100000@fledge.watson.org> In-Reply-To: <7misb86tk0.wl@black.imgsrc.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 25 Aug 2004, Jun Kuriyama wrote: > suser: thread 0xc06aec80 (0 swapper) != curthread 0xc1ee9420 (60 swi5: > clock sio) Hmm. The attached patch replaces one bogus use of a credential with another, but one that won't trigger an assertion. Really, a lot of these socket APIs should be passing credentials rather than threads. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research Index: nfs_socket.c =================================================================== RCS file: /home/ncvs/src/sys/nfsclient/nfs_socket.c,v retrieving revision 1.114 diff -u -r1.114 nfs_socket.c --- nfs_socket.c 13 Jul 2004 05:42:59 -0000 1.114 +++ nfs_socket.c 25 Aug 2004 00:02:25 -0000 @@ -1139,11 +1139,9 @@ struct nfsmount *nmp; int timeo; int s, error; - struct thread *td; struct timeval now; getmicrouptime(&now); - td = &thread0; /* XXX for credentials, may break if sleep */ s = splnet(); TAILQ_FOREACH(rep, &nfs_reqq, r_chain) { nmp = rep->r_nmp; @@ -1206,10 +1204,10 @@ (m = m_copym(rep->r_mreq, 0, M_COPYALL, M_DONTWAIT))){ if ((nmp->nm_flag & NFSMNT_NOCONN) == 0) error = (*so->so_proto->pr_usrreqs->pru_send) - (so, 0, m, NULL, NULL, td); + (so, 0, m, NULL, NULL, curthread); else error = (*so->so_proto->pr_usrreqs->pru_send) - (so, 0, m, nmp->nm_nam, NULL, td); + (so, 0, m, nmp->nm_nam, NULL, curthread); if (error) { if (NFSIGNORE_SOERROR(nmp->nm_soflags, error)) so->so_error = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1040824200115.89999G-100000>