]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Deal with an empty callback array
authorMarc Dionne <marc.dionne@auristor.com>
Thu, 16 Mar 2017 16:27:44 +0000 (16:27 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 16 Mar 2017 16:27:44 +0000 (16:27 +0000)
commitf8ca39bc63287845d1d30724afe746e996e89f2f
tree3e196dac7eed6313b0cd3111002434efc8ed0bb8
parentd8bc7bce1521fdd3864844480697e73996cc9646
afs: Deal with an empty callback array

Servers may send a callback array that is the same size as
the FID array, or an empty array.  If the callback count is
0, the code would attempt to read (fid_count * 12) bytes of
data, which would fail and result in an unmarshalling error.
This would lead to stale data for remotely modified files
or directories.

Store the callback array size in the internal afs_call
structure and use that to determine the amount of data to
read.

Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
fs/afs/cmservice.c
fs/afs/internal.h