• J. Bruce Fields's avatar
    nfsd: initialize nfsd versions before creating svc · e844a7b9
    J. Bruce Fields authored
    Commit 59db4a0c "nfsd: move more into
    nfsd_startup()" inadvertently moved nfsd_versions after
    nfsd_create_svc().  On older distributions using an rpc.nfsd that does
    not explicitly set the list of nfsd versions, this results in
    svc-create_pooled() being called with an empty versions array.  The
    resulting incomplete initialization leads to a NULL dereference in
    svc_process_common() the first time a client accesses the server.
    
    Move nfsd_reset_versions() back before the svc_create_pooled(); this
    time, put it closer to the svc_create_pooled() call, to make this
    mistake more difficult in the future.
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    e844a7b9
nfssvc.c 15.5 KB