afs: afs_pag_wait() makes process unkillable 60/12260/7
authorMarcio Barbosa <mbarbosa@sinenomine.net>
Thu, 7 Nov 2019 03:10:12 +0000 (00:10 -0300)
committerBenjamin Kaduk <kaduk@mit.edu>
Thu, 28 Nov 2019 07:18:32 +0000 (02:18 -0500)
commit9563807791e2402f7a214a90e96cf6ed8ea5abfb
treed7b2314e880a3709098aaceb5d775b2567165630
parent9d0854547522f7b2fb1bb7aa876fe9f901674747
afs: afs_pag_wait() makes process unkillable

To enforce a maximum average rate of one PAG allocation per second,
afs_pag_wait(), called by afs_setpag*(), sleeps until the difference
between the current time and pag_epoch gets greater than pagCounter.
Unfortunately, this function ignores the code returned by afs_osi_Wait().
As a result, it is not possible to kill the process that requested the
new pag while afs_pag_wait() is sleeping.

To fix this problem, do not ignore the code returned by afs_osi_Wait().

Change-Id: I6be11a569edcafa6ecdf716e5315fc75f5a128e8
Reviewed-on: https://gerrit.openafs.org/12260
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/afs/afs_osi_pag.c