* [PATCH][SMB3.1.1] incorrect initialization of the posix extensions in new mount API
@ 2021-08-23 19:07 Steve French
2021-08-24 11:52 ` Christian Brauner
0 siblings, 1 reply; 3+ messages in thread
From: Steve French @ 2021-08-23 19:07 UTC (permalink / raw)
To: CIFS; +Cc: Christian Brauner, Namjae Jeon
[-- Attachment #1: Type: text/plain, Size: 1091 bytes --]
We were incorrectly initializing the posix extensions in the
conversion to the new mount API.
CC: <stable@vger.kernel.org> # 5.11+
Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
Suggested-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
---
fs/cifs/fs_context.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index 4515a0883262..3109def8e199 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -1252,10 +1252,17 @@ static int smb3_fs_context_parse_param(struct
fs_context *fc,
ctx->posix_paths = 1;
break;
case Opt_unix:
- if (result.negated)
+ if (result.negated) {
+ if (ctx->linux_ext == 1)
+ pr_warn_once("conflicting posix mount options specified\n");
ctx->linux_ext = 0;
- else
ctx->no_linux_ext = 1;
+ } else {
+ if (ctx->no_linux_ext == 1)
+ pr_warn_once("conflicting posix mount options specified\n");
+ ctx->linux_ext = 1;
+ ctx->no_linux_ext = 0;
+ }
break;
case Opt_nocase:
ctx->nocase = 1;
--
Thanks,
Steve
[-- Attachment #2: 0001-smb3-fix-posix-extensions-mount-option.patch --]
[-- Type: text/x-patch, Size: 1322 bytes --]
From bfb7d1b8806fe8decc977963b9eddbf9c4ced9d5 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Mon, 23 Aug 2021 13:52:12 -0500
Subject: [PATCH] smb3: fix posix extensions mount option
We were incorrectly initializing the posix extensions in the
conversion to the new mount API.
CC: <stable@vger.kernel.org> # 5.11+
Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
Suggested-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
---
fs/cifs/fs_context.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index 4515a0883262..3109def8e199 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -1252,10 +1252,17 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
ctx->posix_paths = 1;
break;
case Opt_unix:
- if (result.negated)
+ if (result.negated) {
+ if (ctx->linux_ext == 1)
+ pr_warn_once("conflicting posix mount options specified\n");
ctx->linux_ext = 0;
- else
ctx->no_linux_ext = 1;
+ } else {
+ if (ctx->no_linux_ext == 1)
+ pr_warn_once("conflicting posix mount options specified\n");
+ ctx->linux_ext = 1;
+ ctx->no_linux_ext = 0;
+ }
break;
case Opt_nocase:
ctx->nocase = 1;
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][SMB3.1.1] incorrect initialization of the posix extensions in new mount API
2021-08-23 19:07 [PATCH][SMB3.1.1] incorrect initialization of the posix extensions in new mount API Steve French
@ 2021-08-24 11:52 ` Christian Brauner
2021-08-24 16:02 ` Steve French
0 siblings, 1 reply; 3+ messages in thread
From: Christian Brauner @ 2021-08-24 11:52 UTC (permalink / raw)
To: Steve French; +Cc: CIFS, Namjae Jeon
On Mon, Aug 23, 2021 at 02:07:22PM -0500, Steve French wrote:
> We were incorrectly initializing the posix extensions in the
> conversion to the new mount API.
>
> CC: <stable@vger.kernel.org> # 5.11+
> Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
> Suggested-by: Namjae Jeon <namjae.jeon@samsung.com>
> Signed-off-by: Steve French <stfrench@microsoft.com>
> ---
The indentation looks rather strange to me but maybe that's just mail
that got garbled. In any case, with the indentation fixed:
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][SMB3.1.1] incorrect initialization of the posix extensions in new mount API
2021-08-24 11:52 ` Christian Brauner
@ 2021-08-24 16:02 ` Steve French
0 siblings, 0 replies; 3+ messages in thread
From: Steve French @ 2021-08-24 16:02 UTC (permalink / raw)
To: Christian Brauner; +Cc: CIFS, Namjae Jeon
[-- Attachment #1: Type: text/plain, Size: 825 bytes --]
Yes - the indentation is just cut-n-paste gmail strangeness - you can
see the proper indentation in the attachment
On Tue, Aug 24, 2021 at 6:52 AM Christian Brauner
<christian.brauner@ubuntu.com> wrote:
>
> On Mon, Aug 23, 2021 at 02:07:22PM -0500, Steve French wrote:
> > We were incorrectly initializing the posix extensions in the
> > conversion to the new mount API.
> >
> > CC: <stable@vger.kernel.org> # 5.11+
> > Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
> > Suggested-by: Namjae Jeon <namjae.jeon@samsung.com>
> > Signed-off-by: Steve French <stfrench@microsoft.com>
> > ---
>
> The indentation looks rather strange to me but maybe that's just mail
> that got garbled. In any case, with the indentation fixed:
>
> Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
--
Thanks,
Steve
[-- Attachment #2: 0001-smb3-fix-posix-extensions-mount-option.patch --]
[-- Type: text/x-patch, Size: 1322 bytes --]
From bfb7d1b8806fe8decc977963b9eddbf9c4ced9d5 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Mon, 23 Aug 2021 13:52:12 -0500
Subject: [PATCH] smb3: fix posix extensions mount option
We were incorrectly initializing the posix extensions in the
conversion to the new mount API.
CC: <stable@vger.kernel.org> # 5.11+
Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
Suggested-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
---
fs/cifs/fs_context.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index 4515a0883262..3109def8e199 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -1252,10 +1252,17 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
ctx->posix_paths = 1;
break;
case Opt_unix:
- if (result.negated)
+ if (result.negated) {
+ if (ctx->linux_ext == 1)
+ pr_warn_once("conflicting posix mount options specified\n");
ctx->linux_ext = 0;
- else
ctx->no_linux_ext = 1;
+ } else {
+ if (ctx->no_linux_ext == 1)
+ pr_warn_once("conflicting posix mount options specified\n");
+ ctx->linux_ext = 1;
+ ctx->no_linux_ext = 0;
+ }
break;
case Opt_nocase:
ctx->nocase = 1;
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-24 16:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23 19:07 [PATCH][SMB3.1.1] incorrect initialization of the posix extensions in new mount API Steve French
2021-08-24 11:52 ` Christian Brauner
2021-08-24 16:02 ` Steve French
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).