Received: by 10.213.65.68 with SMTP id h4csp2118992imn; Sun, 8 Apr 2018 20:10:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+6Kv4zqLQTJqJzMvhAgeLdAUnFai3uCDMMSkKTs5yMwE6SMncQmiWSB9ORA7wAEdDnovce X-Received: by 2002:a17:902:2862:: with SMTP id e89-v6mr36665576plb.348.1523243429565; Sun, 08 Apr 2018 20:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243429; cv=none; d=google.com; s=arc-20160816; b=DlZ3s3nvvrD9WyYLR0EzlLm3Hr1653UQzwJGgqubRSqPV82U5fZq8mQpO/58ZetuwD aqOMaDjZ39lL19Q9XT1ljEIkNs+sb5ALg9lZEt+7WsHxzkWLiafMcRoJGIgjkBa5P8c1 mxUlI3RP+rRLyPJJcuOi31kIEZsz9xD5mea/JVbTBNRcODa8enaaJDwgPnVrC5W+UkUL 92mUUdKjlqcv97caEPiKMqlfEMe31ILwfL9v29ULtLR87StNJVwDyWAgs9jBfFnZvNQM yfQOZQTBnG69pxkg29OZsWQ/YfAPo5DyrfatcwoJjRBs3J1BezV+J6XQm9q1Q+l+VeS7 kcCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=g9g/TxhqKXIUz/9Oe+mVQjol7voaRQktGXND25O/39U=; b=o5cRAVJnmKwYAMYAhbA9CIg9fJq5OBurEXb8UI0RekoqZlGi0WGupOCMhh10Zc0fKY KKcYwDLyjgmV7ASN8vBVHxxXnYe4Nu9aRugyv4iI/GDTtFKhvnPV8ebTH8EntqfaGZAh lTkps3xcpLXZDH3bMLyl5bQeG+fP8fv/LQiIY009r7q/g2CREl+ZEWHK2e1Emn27Utbr JVA2M2eQNc1SbWIDsyE3qyQUCpAl0I+yal5TSyrc3YNR4dhBT53En4Oho6JKT9XjNPe9 MCB0+SGw3p3nZ5LhBzdAROni5/beIUH1KLt+WyRWpWW4fv2qfl2p1LoB8C95+wPHvMiU a79g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=h9p7OIqn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7-v6si13149546plk.347.2018.04.08.20.09.52; Sun, 08 Apr 2018 20:10:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=h9p7OIqn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933097AbeDIBnh (ORCPT + 99 others); Sun, 8 Apr 2018 21:43:37 -0400 Received: from mail-bl2nam02on0134.outbound.protection.outlook.com ([104.47.38.134]:51004 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932258AbeDIAep (ORCPT ); Sun, 8 Apr 2018 20:34:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=g9g/TxhqKXIUz/9Oe+mVQjol7voaRQktGXND25O/39U=; b=h9p7OIqnEsfDL4S8v/c8YSEeDHlK9d+/nP4C6seGDcMwBXbOS+djm4OleDN0WIFu22f4qse82cLoz9H+GeEog7t7GJMefQWRp7klC46ltvl4u4ix+dBn6iVil4wIO3OBtVE7s9WSysrieOJ1UWOLPtloj4Io9Aolx8PqcA8mCG4= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0984.namprd21.prod.outlook.com (52.132.133.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:34:41 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:34:40 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Arnd Bergmann , Steve French , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 280/293] cifs: silence compiler warnings showing up with gcc-8.0.0 Thread-Topic: [PATCH AUTOSEL for 4.9 280/293] cifs: silence compiler warnings showing up with gcc-8.0.0 Thread-Index: AQHTz5lqbFn/rkDrrUG/fAEsCrDBFQ== Date: Mon, 9 Apr 2018 00:26:34 +0000 Message-ID: <20180409002239.163177-280-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0984;7:7bVvhwOvewK/TQw/XtKDdM4t5E8FjLgF32fEEJ0SaikMZcm1eDPz3s60UpC4HrumT0LZQbAhEnVKYy5Y8np4XKIS3ZL7fVFPbkakLCJgyyWfc60pCk5Wqo8nnHQkS/M3AZq2Ktv6R2yjbYPkIo0jg990YmyMQmRLVq8UmFiTdWzFzuItozHv68uATTOlpk5dKXV9cAhjhdX2VAcJ4miOVsa8IdkYu/9WuNTgmsgTt/zhZBTh9MufcIpe/fHiWzM7;20:kMli92Rk1nsskw20nY9xkRiwGEk2AZijNTGz5RXnW9fqE/ukMzuhOZ9Xk4gVjzTKVkHCtMq7N+E/fjHyhICg98RfiOl1YDi+n+l07mJ8fN3qa2G+40h7nML43nXRSye/9eCUIXgDZNX6SwUGadKnlqy9lvMZh8YVwCpNdBuOfHc= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: acac5e02-07da-4b87-df52-08d59db1aec6 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0984; x-ms-traffictypediagnostic: DM5PR2101MB0984: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0984;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0984; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39860400002)(366004)(39380400002)(346002)(376002)(199004)(189003)(26005)(99286004)(2906002)(14454004)(97736004)(8676002)(81156014)(81166006)(8936002)(6512007)(106356001)(76176011)(186003)(3280700002)(10090500001)(36756003)(6506007)(66066001)(3660700001)(72206003)(478600001)(6666003)(53936002)(2900100001)(105586002)(102836004)(2501003)(110136005)(54906003)(5250100002)(486006)(1076002)(25786009)(6116002)(6436002)(11346002)(39060400002)(6486002)(22452003)(4326008)(446003)(7736002)(86362001)(305945005)(2616005)(476003)(68736007)(3846002)(86612001)(5660300001)(10290500003)(107886003)(316002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0984;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: LL/Q00NUMuir/oVHjZAF/X++6UfPONwJL6KWDyVBM5LjecQm/ujieEmTbAjf8lTx3k+wM7fYcATC9yM4v6fQZPMhz4x0tBeMg83DeYry/3k/i2gPt+JPCIQY0WUhq4UnLAGE+qYPzUfYUYBJTuhoMdEWTcpv+ZnZ0AzAhiu95H9qe0fMgaq+I754X3qHIbOmY7ua+/fs+ZTTpxyrLPgYVIKLuZPcI0M9xwBJ97O7pntpZLAkyodNG0hUkY5TS7AQhfom7PhSpvsXzOh3F3+IpIUleeu0h6PPVYzY2PyfjHFhNreg0B0sHncFPTKtLcoUux1TpHoADMpjO0Hp692ziH7CsScVF/BJLQ/Ssz/S2aFSsIH+c5dReupOynMuCIiJF2Nf7jElyVMPd8+YrMxGvDLu3mF0fKy8F5rI34ZkdV8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: acac5e02-07da-4b87-df52-08d59db1aec6 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:26:34.7696 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0984 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit ade7db991b47ab3016a414468164f4966bd08202 ] This bug was fixed before, but came up again with the latest compiler in another function: fs/cifs/cifssmb.c: In function 'CIFSSMBSetEA': fs/cifs/cifssmb.c:6362:3: error: 'strncpy' offset 8 is out of the bounds [0= , 4] [-Werror=3Darray-bounds] strncpy(parm_data->list[0].name, ea_name, name_len); Let's apply the same fix that was used for the other instances. Fixes: b2a3ad9ca502 ("cifs: silence compiler warnings showing up with gcc-4= .7.0") Signed-off-by: Arnd Bergmann Signed-off-by: Steve French Signed-off-by: Sasha Levin --- fs/cifs/cifssmb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index cc420d6b71f7..d57222894892 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -6413,9 +6413,7 @@ SetEARetry: pSMB->InformationLevel =3D cpu_to_le16(SMB_SET_FILE_EA); =20 - parm_data =3D - (struct fealist *) (((char *) &pSMB->hdr.Protocol) + - offset); + parm_data =3D (void *)pSMB + offsetof(struct smb_hdr, Protocol) + offset; pSMB->ParameterOffset =3D cpu_to_le16(param_offset); pSMB->DataOffset =3D cpu_to_le16(offset); pSMB->SetupCount =3D 1; --=20 2.15.1