Am 02.10.21 um 07:49 schrieb Namjae Jeon:
2021-10-01 21:04 GMT+09:00, Ralph Boehme <slow@xxxxxxxxx>:Cc: Namjae Jeon <linkinjeon@xxxxxxxxxx> Cc: Tom Talpey <tom@xxxxxxxxxx> Cc: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx> Cc: Steve French <smfrench@xxxxxxxxx> Cc: Hyunchul Lee <hyc.lee@xxxxxxxxx> Signed-off-by: Ralph Boehme <slow@xxxxxxxxx> --- fs/ksmbd/smb2misc.c | 25 +++++++++++++++++++++++++ fs/ksmbd/smb2pdu.h | 1 + 2 files changed, 26 insertions(+) diff --git a/fs/ksmbd/smb2misc.c b/fs/ksmbd/smb2misc.c index 2cc031c39514..76f53db7db8d 100644 --- a/fs/ksmbd/smb2misc.c +++ b/fs/ksmbd/smb2misc.c @@ -427,3 +427,28 @@ int smb2_negotiate_request(struct ksmbd_work *work) { return ksmbd_smb_negotiate_common(work, SMB2_NEGOTIATE_HE); } + +/** + * ksmbd_smb2_cur_pdu_buflen() - Get len of current SMB2 PDU buffer + * This returns the lenght including any possible padding. + * @work: smb work containing request buffer + */ +unsigned int ksmbd_smb2_cur_pdu_buflen(struct ksmbd_work *work) +{This patch will cause unused function build warning. so need to combine it with "ksmbd: use ksmbd_smb2_cur_pdu_buflen() in ksmbd_smb2_check_message() "
ok, going to squash this into another commit that uses the function. -slow -- Ralph Boehme, Samba Team https://samba.org/ SerNet Samba Team Lead https://sernet.de/en/team-samba
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature