>Number:         167266
>Category:       kern
>Synopsis:       ZFS + new NFS export (sharenfs) leads to NAMEI leak
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 24 14:20:13 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Brandmueller
>Release:        9-STABLE
>Organization:
>Environment:
FreeBSD silver 9.0-STABLE FreeBSD 9.0-STABLE #9: Sun Apr  8 13:11:22 CEST 2012  
   root@silver:/usr/obj/usr/src/sys/BLACK  amd64
>Description:
If you NFS export a ZFS, create/remove of a file or directory lead to the leak 
of a NAMEI path buffer on the NFS server.

This happens with new nfs (only NFSv3 tested) only, using the old NFS server 
does not trigger the NAMEI path buffer leak.

An exported UFS on the same machine/environment does not trigger the behaviour.
>How-To-Repeat:
rc.conf:
nfs_server_enable="YES"
nfs_server_flags="-u -t -n 64"
mountd_enable="YES"
mountd_flags="/etc/zfs/exports"
rpcbind_enable="YES"
lockd_enable="YES"

(mountd_flags not needed, if zfs_enable is set)


Assuming, you have a USB stick or similar as /dev/da0 (it will probably         
even work with an md device):                                                   
                                                                                
zpool create exptest /dev/da0                                                   
zfs sharenfs="-maproot=0 localhost" exptest                                     
# check with showmount -e exporting worked as expected                          
mount localhost:/exptest /mnt                                                   
cd /mnt                                                                         
vmstat -z | fgrep NAMEI                                                         
echo test > foo                                                                 
vmstat -z | fgrep NAMEI                                                         
rm foo                                                                          
vmstat -z | fgrep NAMEI                                                         

you may repeat the creation/removal of the file several time and you will 
notice the NAMEI count increasing by one on each delete operation, no matter if 
file or directory.
>Fix:
No fix known.
Workaround: using old NFS server.


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to