[issue1661] panic on password entry mount smb filesystem

Matthew Dillon dillon at apollo.backplane.com
Mon Jan 25 17:10:45 PST 2010


:#13 0xc0310d27 in prison_remote_ip (td=3D0x0, ip=3D0xcc753cd0)
:    at /usr/src/sys/kern/kern_jail.c:404
:#14 0xc03cd4a2 in tcp_usr_connect (so=3D0xc16b5f00, nam=3D0xcc753cd0,=20
:    td=3D0xc17131d0) at /usr/src/sys/netinet/tcp_usrreq.c:474
:#15 0xc0351f04 in netmsg_pru_connect (msg=3D0xcc753c28)
:    at /usr/src/sys/kern/uipc_msg.c:486
:#16 0xc0395fe8 in netmsg_service (msg=3D0xcc753c28, mpsafe_mode=3D1, mplock=
:ed=3D0)
:...

    Hmm.  Looks like the thread has a NULL td_ucred.  My guess is that
    smbfs is making the connection itself from a maintainance kernel
    thread.

    Try this patch.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>

diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index f867b9d..6c61867 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -399,7 +399,7 @@ prison_remote_ip(struct thread *td, struct sockaddr *ip)
 	struct sockaddr_in6 *ip6 = (struct sockaddr_in6 *)ip;
 	struct prison *pr;
 
-	if (td == NULL || td->td_proc == NULL)
+	if (td == NULL || td->td_proc == NULL || td->td_ucred == NULL)
 		return(1);
 	if ((pr = td->td_ucred->cr_prison) == NULL)
 		return(1);





More information about the Bugs mailing list