DAFS: Avoid volserver segfault in GetVolInfo
authorAndrew Deason <adeason@sinenomine.net>
Wed, 30 Sep 2009 21:42:46 +0000 (16:42 -0500)
committerDerrick Brashear <shadow|account-1000005@unknown>
Wed, 30 Sep 2009 22:08:12 +0000 (15:08 -0700)
commitd88c03492d1ea9a7533298977d8d6bec5e91ebcd
tree49bc7c04e1bb568b9facc01f53c21c60109021b9
parentb5c4dbf861a0be675e5dbe775059e3bf7628f127
DAFS: Avoid volserver segfault in GetVolInfo

It is possible for GetVolObject to return success, but result in a NULL
fs_tv. In particular, when the fileserver responds with FSYNC_WRONG_PART
or FSYNC_UNKNOWN_VOLID. It is possible, though difficult, for the
fileserver to respond with FSYNC_UNKNOWN_VOLID if the requested volume
hasn't been preattached on the fileserver yet.

So, in GetVolInfo, also check fs_tv, so we don't try to dereference it
later.

Reviewed-on: http://gerrit.openafs.org/562
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/volser/volprocs.c