Jeff Layton has uploaded this change for review.

View Change

NFS: add an on-stack buffer for wire_to_host conversions

Currently, the callers just overwrite the wire handle with the converted
host handle. Overwriting the wire handle like that is somewhat nasty,
but it's also problematic if the host handle is larger than the
wire handle (as will soon be the case for FSAL_CEPH).

Copy the handle into an on-stack buffer first before calling
wire_to_host. Here we assume that the host handle will never be larger
than the max filehandle size for the protocol.

Change-Id: I71791be0c93d5a866da15e50973d1281a0e1ffa2
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
M src/Protocols/NFS/nfs4_op_putfh.c
M src/support/nfs_filehandle_mgmt.c
2 files changed, 18 insertions(+), 3 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/43/496143/1

To view, visit change 496143. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I71791be0c93d5a866da15e50973d1281a0e1ffa2
Gerrit-Change-Number: 496143
Gerrit-PatchSet: 1
Gerrit-Owner: Jeff Layton <jlayton@redhat.com>
Gerrit-MessageType: newchange