Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1681516 > unrolled thread

[PATCH][cifs-next] cifs: set oparms.create_options rather than or'ing in CREATE_OPEN_BACKUP_INTENT

Started byColin King <colin.king@canonical.com>
First post2017-07-05 14:50 +0200
Last post2017-07-06 03:10 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH][cifs-next] cifs: set oparms.create_options rather than or'ing in CREATE_OPEN_BACKUP_INTENT Colin King <colin.king@canonical.com> - 2017-07-05 14:50 +0200
    Re: [PATCH][cifs-next] cifs: set oparms.create_options rather than  or'ing in CREATE_OPEN_BACKUP_INTENT Steve French <smfrench@gmail.com> - 2017-07-06 03:10 +0200
    RE: [PATCH][cifs-next] cifs: set oparms.create_options rather than  or'ing in CREATE_OPEN_BACKUP_INTENT Pavel Shilovskiy <pshilov@microsoft.com> - 2017-07-06 03:10 +0200

#1681516 — [PATCH][cifs-next] cifs: set oparms.create_options rather than or'ing in CREATE_OPEN_BACKUP_INTENT

FromColin King <colin.king@canonical.com>
Date2017-07-05 14:50 +0200
Subject[PATCH][cifs-next] cifs: set oparms.create_options rather than or'ing in CREATE_OPEN_BACKUP_INTENT
Message-ID<tZRUK-6gW-13@gated-at.bofh.it>
From: Colin Ian King <colin.king@canonical.com>

Currently oparms.create_options is uninitialized and the code is logically
or'ing in CREATE_OPEN_BACKUP_INTENT onto a garbage value of
oparms.create_options from the stack.  Fix this by just setting the value
rather than or'ing in the setting.

Detected by CoverityScan, CID#1447220 ("Unitialized scale value")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 fs/cifs/smb2ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 941c40b7a870..c805b7619083 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -1339,7 +1339,7 @@ get_smb2_acl_by_path(struct cifs_sb_info *cifs_sb,
 	xid = get_xid();
 
 	if (backup_cred(cifs_sb))
-		oparms.create_options |= CREATE_OPEN_BACKUP_INTENT;
+		oparms.create_options = CREATE_OPEN_BACKUP_INTENT;
 	else
 		oparms.create_options = 0;
 
-- 
2.11.0

[toc] | [next] | [standalone]


#1681986 — Re: [PATCH][cifs-next] cifs: set oparms.create_options rather than or'ing in CREATE_OPEN_BACKUP_INTENT

FromSteve French <smfrench@gmail.com>
Date2017-07-06 03:10 +0200
SubjectRe: [PATCH][cifs-next] cifs: set oparms.create_options rather than or'ing in CREATE_OPEN_BACKUP_INTENT
Message-ID<u03sR-5GW-1@gated-at.bofh.it>
In reply to#1681516
good catch - merged into cifs-2.6.git for-next

On Wed, Jul 5, 2017 at 7:47 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently oparms.create_options is uninitialized and the code is logically
> or'ing in CREATE_OPEN_BACKUP_INTENT onto a garbage value of
> oparms.create_options from the stack.  Fix this by just setting the value
> rather than or'ing in the setting.
>
> Detected by CoverityScan, CID#1447220 ("Unitialized scale value")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  fs/cifs/smb2ops.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index 941c40b7a870..c805b7619083 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -1339,7 +1339,7 @@ get_smb2_acl_by_path(struct cifs_sb_info *cifs_sb,
>         xid = get_xid();
>
>         if (backup_cred(cifs_sb))
> -               oparms.create_options |= CREATE_OPEN_BACKUP_INTENT;
> +               oparms.create_options = CREATE_OPEN_BACKUP_INTENT;
>         else
>                 oparms.create_options = 0;
>
> --
> 2.11.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks,

Steve

[toc] | [prev] | [next] | [standalone]


#1681988 — RE: [PATCH][cifs-next] cifs: set oparms.create_options rather than or'ing in CREATE_OPEN_BACKUP_INTENT

FromPavel Shilovskiy <pshilov@microsoft.com>
Date2017-07-06 03:10 +0200
SubjectRE: [PATCH][cifs-next] cifs: set oparms.create_options rather than or'ing in CREATE_OPEN_BACKUP_INTENT
Message-ID<u03sR-5GW-5@gated-at.bofh.it>
In reply to#1681516
2017-07-05 5:47 GMT-07:00 Colin King <colin.king@canonical.com>:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently oparms.create_options is uninitialized and the code is logically
> or'ing in CREATE_OPEN_BACKUP_INTENT onto a garbage value of
> oparms.create_options from the stack.  Fix this by just setting the value
> rather than or'ing in the setting.
>
> Detected by CoverityScan, CID#1447220 ("Unitialized scale value")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  fs/cifs/smb2ops.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index 941c40b7a870..c805b7619083 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -1339,7 +1339,7 @@ get_smb2_acl_by_path(struct cifs_sb_info *cifs_sb,
>         xid = get_xid();
>
>         if (backup_cred(cifs_sb))
> -               oparms.create_options |= CREATE_OPEN_BACKUP_INTENT;
> +               oparms.create_options = CREATE_OPEN_BACKUP_INTENT;
>         else
>                 oparms.create_options = 0;
>


Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>

--
Best regards,
Pavel Shilovsky

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web