From patchwork Mon Apr 9 00:41:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 132957 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp652246ljb; Sun, 8 Apr 2018 17:44:07 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/srmrT3cq8VtlduIBdwxoauUKEq/qvcZ+dKNwwl/cF9p2oaSJyGGzYtxw7YVsd3UUqgg55 X-Received: by 2002:a17:902:7793:: with SMTP id o19-v6mr3334671pll.349.1523234647321; Sun, 08 Apr 2018 17:44:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523234647; cv=none; d=google.com; s=arc-20160816; b=md/Koe37ZukFuxN/jamYpuuau6oaQccekYtOSH/V0NaWsu2NA9jVU4IApCvPTrfkBJ mUMvCd/1UYglyZU7dSPqe/ezisZ1a4KCGTdXurlldatJ/BXnfmqAQnBGG/aZ9znEsHlJ 7lTQCyIgvdRp2FE9PP32Mido9GsCeg1CYPmNyUxJQxI8RkgbhT5RYiQKpc8xXwFuQBCO MGxbyG4E1fo6vj/BUV6nnmoCxtmUz8DH02IFEK2qUUYetCaCkEM2ndoNpzX6yLoQGIJI YhnOqiA7tMw+/HekqLFaUx4PyojfhmPn+Cm6o4Yq2GkQZDINCigFogLpV6rn3L/Vr3cl MfFA== 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=80knjo4JrZ2kR0bo6U335lpJnIlnKb6mr7cMXu/15SA=; b=d3Age8/RHLsHQQ8UjjL7WMAnmet1AOtP2V3K9L9vU2QXojMuWQF/cj24R0v3jrOX6P koryz6TbixnSF828XLm5j5HTgZ3FzTtzSWFA80kcGpkWuJKOpuMRc9aPxzNvsug/zFPE xdt4Ba5WJG4gWfPfRKCe5SED/xkJtixz2TwHy7rWkNVBCCkFzW3L5O6zYea+xg3viCOY xM1Z0U35fERY3Q2EdhUsNh7xf80ypaHKgLGdS3W8z91XX4c2RSzY3yaNya/bT7rageg5 1kgYVfo7aIEvxQxWYiizk1sBJ9y7TD4fYDH78gOwh1fjuqMwJ/oF+L8Ek83VJahjUWF4 FEGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=pAQ2A8Wh; 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 w16-v6si12860200plp.621.2018.04.08.17.44.07; Sun, 08 Apr 2018 17:44:07 -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=pAQ2A8Wh; 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 S1756796AbeDIAme (ORCPT + 29 others); Sun, 8 Apr 2018 20:42:34 -0400 Received: from mail-sn1nam02on0120.outbound.protection.outlook.com ([104.47.36.120]:45955 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756772AbeDIAm2 (ORCPT ); Sun, 8 Apr 2018 20:42:28 -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=80knjo4JrZ2kR0bo6U335lpJnIlnKb6mr7cMXu/15SA=; b=pAQ2A8Wh/9XVN8zHnVBAJ4xCkrBYdaT+RylFeKmos/PtVgYqYbAmv1iiJXNqutajei7LhP54Ny/YqH3sFFpgzOdESlNw6LSQXhfQnXXy4NJOiR9UGry5+REa0bpZGEv6qs5n7zspy220Xbt/N64glup1LSpabkLu50C/lYFK0Uc= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1030.namprd21.prod.outlook.com (52.132.128.11) 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:42:26 +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:42:25 +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 3.18 095/101] cifs: silence compiler warnings showing up with gcc-8.0.0 Thread-Topic: [PATCH AUTOSEL for 3.18 095/101] cifs: silence compiler warnings showing up with gcc-8.0.0 Thread-Index: AQHTz5uN7jhZmXFu4kyyf9DFqut6EQ== Date: Mon, 9 Apr 2018 00:41:51 +0000 Message-ID: <20180409004042.164920-45-alexander.levin@microsoft.com> References: <20180409004042.164920-1-alexander.levin@microsoft.com> In-Reply-To: <20180409004042.164920-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; DM5PR2101MB1030; 7:+FsWjYw6p5js8zKoa76Q8s0JVWG8rZiO0ymeAevv9Gop0ju1cvYvaEhlpiOOC6GKrpfC1QjHrjYYXzLtWWgGMq+kVT5begTPT4vkfxzLBbFQmbKZdTtgo9RRb0Mp13fhyWJfNSRMyWsInKPPDTIfL0dZKMLzz8JaBWiN3VpoeWXAcf5BfVpaCZpuvSh1EMCufyJ1uxrNBroo++1gtggbYzOWZUoVSMhaGd2qIFDo66cACnzimdt/p3HP80LeDz5r; 20:87b075yejGuqd8PUJOR1QfxHgsH577eXLR8hC6P/DDpRxvsNPt94brr2x4iJVcftIDiW4tEhxvqeSVvOu96Fv2tjmJwOtlglXz5oYGLok/busyjCx6/UIh76f4qKXt0ST2tksjZCu+B/mB+mcgbxbEjxJC7OYZixhhGrppqBS/k= X-MS-Office365-Filtering-Correlation-Id: 8d75604a-2ff7-454e-bdd9-08d59db2c3f0 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603328)(7193020); SRVR:DM5PR2101MB1030; x-ms-traffictypediagnostic: DM5PR2101MB1030: 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)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR2101MB1030; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1030; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(396003)(39380400002)(346002)(39860400002)(376002)(189003)(199004)(7736002)(5250100002)(53936002)(66066001)(97736004)(99286004)(6506007)(68736007)(186003)(26005)(22452003)(86362001)(11346002)(6486002)(486006)(305945005)(316002)(3280700002)(110136005)(76176011)(476003)(102836004)(6666003)(446003)(3660700001)(5660300001)(2616005)(8936002)(8676002)(6512007)(81156014)(81166006)(2906002)(36756003)(6436002)(14454004)(86612001)(10090500001)(54906003)(39060400002)(2501003)(105586002)(25786009)(4326008)(478600001)(10290500003)(1076002)(3846002)(72206003)(6116002)(106356001)(107886003)(2900100001)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1030; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: zNLyMufk2vhEkwhMS1fdGPX2yULWRqdgxjGMAkbQwM5FRaEtefo3xV+wAwrDbf3F8e7Etn6bf8B/cC8OfLarEkAvxQH+uJSqHhxtvoo8IlyAc9VoTd63NjGlChQa3bcQ2J2vOgGl/wJXpJrcAa56gc2GuuN0UiYaA4XfVMrd7/6eQyTdLEjQp4BRA7cddsPLkeqhN6kZeHaxVRE8EZljSULeRzNb9z0s7li80oJ4FrtLLy7iplFe0gt5HXxd8jMwxlvDPzYb+TJL0ZhBI8m284NahvAP38u8Hxm5DFgnlevZYavhSPzIKHxYAoqZJZUVvpo2hTiGOgiTTDeoc/QnOgTp64ft7+7zMSHvwrPF4kMduozGiKdVTZAPEh6yw1VySmPdmrDabzAhB/WKyJHAgPstdm2SI4aTRFb7UohgU9Y= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d75604a-2ff7-454e-bdd9-08d59db2c3f0 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:41:51.7366 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1030 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=array-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(-) -- 2.15.1 diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index b2218b755dab..fdb72e4dc776 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -6413,9 +6413,7 @@ SetEARetry: pSMB->InformationLevel = cpu_to_le16(SMB_SET_FILE_EA); - parm_data = - (struct fealist *) (((char *) &pSMB->hdr.Protocol) + - offset); + parm_data = (void *)pSMB + offsetof(struct smb_hdr, Protocol) + offset; pSMB->ParameterOffset = cpu_to_le16(param_offset); pSMB->DataOffset = cpu_to_le16(offset); pSMB->SetupCount = 1;