]> git.michaelhowe.org Git - packages/o/openafs.git/commit
DAFS: Do not let VScheduleSalvage_r free vp
authorAndrew Deason <adeason@sinenomine.net>
Fri, 5 Nov 2010 19:34:05 +0000 (14:34 -0500)
committerDerrick Brashear <shadow@dementia.org>
Wed, 8 Dec 2010 00:03:22 +0000 (16:03 -0800)
commita2a096547d341b3475c13ff9a2845284f973990f
tree8b8ce798ac50cf8d88bb56ef6c4b04f4045ef0ae
parent6c5a28647dfaa3cac5e08279ffacb6484c8926ef
DAFS: Do not let VScheduleSalvage_r free vp

In VScheduleSalvage_r, we were calling VCancelReservation_r, which has
the possibility of free'ing vp. Since we still use vp after doing this
(and since we're already inside VCancelReservation_r to begin with),
we must not free vp. Instead, just decrement nWaiters without
triggering any of the dtor code in VCancelReservation_r. This is safe
as long as all VScheduleSalvage_r callers ensure that they check to
free the vp if necessary, which they all do.

Thanks to Derrick Brashear.

Reviewed-on: http://gerrit.openafs.org/3272
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ef4b9e13ef6a79d7e5f540297e486189fdedf085)
Change-Id: I2f49d5eb6f9bad2343ee9a9c84ccbc1f323cc8a8
Reviewed-on: http://gerrit.openafs.org/3479
src/vol/volume.c