Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752645AbdGFBBi (ORCPT ); Wed, 5 Jul 2017 21:01:38 -0400 Received: from mail-by2nam01on0109.outbound.protection.outlook.com ([104.47.34.109]:22549 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751914AbdGFBBg (ORCPT ); Wed, 5 Jul 2017 21:01:36 -0400 From: Pavel Shilovskiy To: Colin King , Steve French , "linux-cifs@vger.kernel.org" , "samba-technical@lists.samba.org" CC: "kernel-janitors@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH][cifs-next] cifs: set oparms.create_options rather than or'ing in CREATE_OPEN_BACKUP_INTENT Thread-Topic: [PATCH][cifs-next] cifs: set oparms.create_options rather than or'ing in CREATE_OPEN_BACKUP_INTENT Thread-Index: AQHS9YzjpqxHT1Zq8k6VpNigUCmLyqJF+0qA Date: Thu, 6 Jul 2017 01:01:34 +0000 Message-ID: References: <20170705124734.12816-1-colin.king@canonical.com> In-Reply-To: <20170705124734.12816-1-colin.king@canonical.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Ref=https://api.informationprotection.azure.com/api/72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=pshilov@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2017-07-05T18:01:33.3296176-07:00; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General authentication-results: canonical.com; dkim=none (message not signed) header.d=none;canonical.com; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [2601:600:897f:eccf:850d:837e:8c39:dce3] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR21MB0470;7:WVvHGeA/j+dbKstN23EzRG42utFfkhX82jntP6CJHjlWp0FLBV5MrSuba3Y8gCe+ZrNDgtFQAGj2YfNsTop9R/bHearc1TA1udzTAuZqwEIXsHhxyzH6IVy355OXX+QdM1h2PGomGigw+7yYAv21CmhopXUjH5ZeTMNK4iar61F++IqfLXafj8/9+ZSkHKxxQepucun/e87gyb0XC7GatRg6S02Mf94LMHcaNywo5W9Yl/jE5dGyqhhe2I1KYreaTgQqgl5W8ZqpFW0vlZ9ad3EEXObifPOryldkaf40QddQQBAXYatdDppw02fkY7OmjpaPVKYvAQY+ww8UaeIR8bcrI2uSJseJqo5W+ekhx5yYLjUTNvi4cd2SOhIwXgC5hcU6nr/fMZn4GHRnJLt2aEcQr8+y7U8sUZlqYJ4R3uAG2v3cqB4C1ZMUWJsQhtTnsDeqdoQIgvX9lrZ+Cipg/sT1VZ6UCnMxfzw4Q9HcNkBD+oz201OBDpF/ZjQPCcW7DngmfOPDbnF1GYUoYCspJBeW4AvC9OPCMM/si3nnnIp/aYR+eadw6hY5icOdsyjPh24OSy13s8KJBZx5rNvGt2DDH+kZiMLqxIXd9XeErjAv2hYskQcbynJ4XeWQSr+uNDrrL7Z3MuqWdICJJ5bKsygZJVPgqpGvRFZCpzvD3gRrfi8oQYHvk544aWTii7IIvvrE6Tbw9zix3qUlQDQFQrNMdanZVIbGCPMiaKXCYtLVjl7u8q4w+oWLib+kOpt4TQ2HSbSSTTk2ZMdfDN76ELXBsSoFFV7z/zsIkLTIhy6LYKXozZ1eDp2y+ipII88A x-ms-office365-filtering-correlation-id: 256a6095-3152-40a3-58fa-08d4c40a8c60 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY4PR21MB0470; x-ms-traffictypediagnostic: CY4PR21MB0470: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(236129657087228)(198206253151910); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(601004)(2401047)(5005006)(2017060910040)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR21MB0470;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR21MB0470; x-forefront-prvs: 03607C04F0 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39410400002)(39400400002)(39860400002)(39850400002)(39840400002)(39450400003)(7696004)(5660300001)(86612001)(33656002)(86362001)(8936002)(81166006)(8676002)(305945005)(189998001)(2900100001)(74316002)(7736002)(25786009)(53936002)(2950100002)(8990500004)(6116002)(102836003)(6246003)(2501003)(38730400002)(6506006)(3660700001)(3280700002)(9686003)(4326008)(6436002)(2906002)(55016002)(99286003)(54906002)(14454004)(77096006)(10090500001)(10290500003)(50986999)(76176999)(54356999)(5005710100001)(478600001)(2201001)(229853002);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0470;H:CY4PR21MB0135.namprd21.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jul 2017 01:01:34.9299 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0470 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v6611hCn023898 Content-Length: 1163 Lines: 36 2017-07-05 5:47 GMT-07:00 Colin King : > From: Colin Ian King > > 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 > --- > 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 -- Best regards, Pavel Shilovsky