All of lore.kernel.org
 help / color / mirror / Atom feed
* [SMB3][PATCH] fix unneeded error message on change notify
@ 2020-07-08  4:47 Steve French
  2020-07-08  6:26 ` ronnie sahlberg
  0 siblings, 1 reply; 2+ messages in thread
From: Steve French @ 2020-07-08  4:47 UTC (permalink / raw)
  To: CIFS

[-- Attachment #1: Type: text/plain, Size: 65 bytes --]

Fix the length check on SMB3 change notify



-- 
Thanks,

Steve

[-- Attachment #2: 0001-smb3-fix-unneeded-error-message-on-change-notify.patch --]
[-- Type: text/x-patch, Size: 1203 bytes --]

From 51783092719842b4443929098af1f848df5dbeb2 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Tue, 7 Jul 2020 23:43:39 -0500
Subject: [PATCH] smb3: fix unneeded error message on change notify

We should not be logging a warning repeatedly on change notify.

CC: Stable <stable@vger.kernel.org> # v5.6+
Signed-off-by: Steve French <stfrench@microsoft.com>
---
 fs/cifs/smb2misc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c
index 6a39451973f8..157992864ce7 100644
--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -354,9 +354,13 @@ smb2_get_data_area_len(int *off, int *len, struct smb2_sync_hdr *shdr)
 		  ((struct smb2_ioctl_rsp *)shdr)->OutputCount);
 		break;
 	case SMB2_CHANGE_NOTIFY:
+		*off = le16_to_cpu(
+		  ((struct smb2_change_notify_rsp *)shdr)->OutputBufferOffset);
+		*len = le32_to_cpu(
+		  ((struct smb2_change_notify_rsp *)shdr)->OutputBufferLength);
+		break;
 	default:
-		/* BB FIXME for unimplemented cases above */
-		cifs_dbg(VFS, "no length check for command\n");
+		cifs_dbg(VFS, "no length check for command %d\n", le16_to_cpu(shdr->Command));
 		break;
 	}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [SMB3][PATCH] fix unneeded error message on change notify
  2020-07-08  4:47 [SMB3][PATCH] fix unneeded error message on change notify Steve French
@ 2020-07-08  6:26 ` ronnie sahlberg
  0 siblings, 0 replies; 2+ messages in thread
From: ronnie sahlberg @ 2020-07-08  6:26 UTC (permalink / raw)
  To: Steve French; +Cc: CIFS

Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>

On Wed, Jul 8, 2020 at 2:49 PM Steve French <smfrench@gmail.com> wrote:
>
> Fix the length check on SMB3 change notify
>
>
>
> --
> Thanks,
>
> Steve

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-08  6:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08  4:47 [SMB3][PATCH] fix unneeded error message on change notify Steve French
2020-07-08  6:26 ` ronnie sahlberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.