]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix warning due to unadvanced marshalling pointer
authorDavid Howells <dhowells@redhat.com>
Tue, 3 Nov 2020 16:32:58 +0000 (16:32 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 3 Nov 2020 17:53:40 +0000 (09:53 -0800)
commit7d14b4b8bd6f9254d83e1bb9c41d7bdd5d83a730
tree8be2ab8d7008001f79e6ef0dd23baa075044fc4a
parent89f558ba837c7cea8e42898c7eb6966f1dac5c5b
afs: Fix warning due to unadvanced marshalling pointer

When using the afs.yfs.acl xattr to change an AuriStor ACL, a warning
can be generated when the request is marshalled because the buffer
pointer isn't increased after adding the last element, thereby
triggering the check at the end if the ACL wasn't empty.  This just
causes something like the following warning, but doesn't stop the call
from happening successfully:

    kAFS: YFS.StoreOpaqueACL2: Request buffer underflow (36<108)

Fix this simply by increasing the count prior to the check.

Fixes: 2619d017a0e1 ("afs: Implement YFS ACL setting")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/afs/yfsclient.c