malloc(M_WAITOK) of "32", forcing M_NOWAIT

From: Jun Kuriyama <kuriyama_at_imgsrc.co.jp>
Date: Thu, 17 Jun 2004 15:04:03 +0900
Just FYI: On today's -current.


malloc(M_WAITOK) of "32", forcing M_NOWAIT with the following non-sleepable locks held:
exclusive sleep mutex nfsd_mtx r = 0 (0xc0745be0) locked _at_ nfsserver/nfs_srvcache.c:220
Stack backtrace:
backtrace(1,c06e06e0,c1035420,1,e4dffc24) at backtrace+0x12
witness_warn(5,0,c06a35df,c067fc35) at witness_warn+0x18e
uma_zalloc_arg(c1035420,0,2) at uma_zalloc_arg+0x38
malloc(1c,c06e06e0,2,c4a80100,c3cffa00) at malloc+0xb2
sodupsockaddr(c4c0af40,2,e4dffc78,40d11376,c3a47480) at sodupsockaddr+0x19
nfsrv_getcache(c3cffa00,e4dffca8,0,2,2) at nfsrv_getcache+0x323
nfssvc_nfsd(c3b0e000,c051627f,c0707920,0,c068f808) at nfssvc_nfsd+0x2b9
nfssvc(c3b0e000,e4dffd14,2,0,292) at nfssvc+0x17b
syscall(2f,2f,2f,bfbfeec4,1) at syscall+0x217
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (155), eip = 0x280c42fb, esp = 0xbfbfeb2c, ebp = 0xbfbfeb48 ---

(gdb) l *sodupsockaddr+0x19
0xc053ca4d is in sodupsockaddr (../../../kern/uipc_socket2.c:1095).
1090    struct sockaddr *
1091    sodupsockaddr(const struct sockaddr *sa, int mflags)
1092    {
1093            struct sockaddr *sa2;
1094    
1095            sa2 = malloc(sa->sa_len, M_SONAME, mflags);
1096            if (sa2)
1097                    bcopy(sa, sa2, sa->sa_len);
1098            return sa2;
1099    }
(gdb) l *nfsrv_getcache+0x323
0xc05d2be7 is in nfsrv_getcache (../../../nfsserver/nfs_srvcache.c:252).
247                     break;
248     /*      case AF_INET6:  */
249     /*      case AF_ISO:    */
250             default:
251                     rp->rc_flag |= RC_NAM;
252                     rp->rc_nam = sodupsockaddr(nd->nd_nam, M_WAITOK);
253                     break;
254             };
255             rp->rc_proc = nd->nd_procnum;
256             LIST_INSERT_HEAD(NFSRCHASH(nd->nd_retxid), rp, rc_hash);
(gdb) l *nfssvc_nfsd+0x2b9
0xc05d4b45 is in nfssvc_nfsd (../../../nfsserver/nfs_syscalls.c:407).
402                             nd->nd_nam = slp->ns_nam;
403     
404                         /*
405                          * Check to see if authorization is needed.
406                          */
407                         cacherep = nfsrv_getcache(nd, &mreq);
408     
409                         if (nfs_privport) {
410                             /* Check if source port is privileged */
411                             u_short port;


-- 
Jun Kuriyama <kuriyama_at_imgsrc.co.jp> // IMG SRC, Inc.
             <kuriyama_at_FreeBSD.org> // FreeBSD Project
Received on Thu Jun 17 2004 - 04:06:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:57 UTC