]> 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)
commit370f564db7336d4923eaf64e37ce5b0d1a0f11cb
tree3e196dac7eed6313b0cd3111002434efc8ed0bb8
parentc5e2cf810d8ba8c0023efc6c34d1ad2756871a5c
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