Skip to content

Commit c80afa1

Browse files
dhowellstorvalds
authored andcommitted
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: f5e4546 ("afs: Implement YFS ACL setting") Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 90bfdee commit c80afa1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎fs/afs/yfsclient.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,6 +1990,7 @@ void yfs_fs_store_opaque_acl2(struct afs_operation *op)
19901990
memcpy(bp, acl->data, acl->size);
19911991
if (acl->size != size)
19921992
memset((void *)bp + acl->size, 0, size - acl->size);
1993+
bp += size / sizeof(__be32);
19931994
yfs_check_req(call, bp);
19941995

19951996
trace_afs_make_fs_call(call, &vp->fid);

0 commit comments

Comments
 (0)