]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: initialize nfsd versions before creating svc
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 6 Aug 2010 19:48:03 +0000 (15:48 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 6 Aug 2010 21:05:40 +0000 (17:05 -0400)
commitde0d0e9d988d005d246d8b3cd86b62e091206f68
treef0270f65da19a0f6ebc50787dd9edce6a8def9d3
parent648ab8868e00879d261eac6d51b69038b6d8ec6b
nfsd: initialize nfsd versions before creating svc

Commit 4e181d9b8c86bf8c0fb90625401d748715f7daec "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: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfssvc.c