]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Do not trust FetchData length from fileservers
authorAndrew Deason <adeason@sinenomine.net>
Thu, 17 Dec 2009 20:59:44 +0000 (14:59 -0600)
committerDerrick Brashear <shadow|account-1000005@unknown>
Sat, 19 Dec 2009 00:13:20 +0000 (16:13 -0800)
commit8644f90a75281c8f678e2c3b93531857b9f3fa1f
treef0e09b4345d5c83886048e85a04e4f8770d46059
parent54257ecca31b6dc97fc4a33a1c409daa474606c3
Do not trust FetchData length from fileservers

Currently the Unix CM implicitly trusts that the length from a FetchData
request from a fileserver will always be less than the requested length.
If the fileserver sends more data than requested, we can use up more
cache space than we intended, possibly exceeding the cacheinfo cache
limits.

Add a check for this, and return EIO to the caller if the fileserver
responds with too much data.

Reviewed-on: http://gerrit.openafs.org/996
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 c7b92a3018044f7aca4d9a77644e5c06ef64d1e9)

Change-Id: Ibbbc989cfb6522bb7d3c3003d31931549812d18e
Reviewed-on: http://gerrit.openafs.org/1002
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/afs_dcache.c