As I experience system crushes at time of mbufs exhaustion I've compiled a debug kernel and traced the problem. I seems the NFS functions (nfsm_rpchead, nfsm_reqh ...) does *NOT* chek if they really have allocated memory by MGET macro. First problem that I saw was in nfsm_reqh at nfs/nfs_subs.c:593 (4.7-STABLE). I've added a check for mb == 0 - if so function just retuns NULL. But here raise another problem in "second level" functions - they don't check what lower level functions return , thus they crush kernel if the lower level functions return NULL. You could see it in nfs3_access_otw at nfs_vnops.c:293 - there is absent a check for value returned by nfsm_reqhead macro which calls nfsm_reqh(). I've looked at the other parts of kernel (drivers mainly) and I saw that after MGET allocations drivers check if they really have allocated mbufs (xl dirver) (which is not true for NFS :). Why NFS functions doesn't care if they really have allocated mbufs ? :), and I think they should care.
regards To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message