From patchwork Thu Mar 1 15:27:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130314 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp2955019edc; Thu, 1 Mar 2018 07:40:43 -0800 (PST) X-Google-Smtp-Source: AG47ELvO7B6njNixq2rSnj9/C5K1xTGVUcylDaIMEUhRym82/P4SFd2bGTkiAJUZaxM/XmiM1deC X-Received: by 2002:a17:902:7445:: with SMTP id e5-v6mr2304812plt.204.1519918843259; Thu, 01 Mar 2018 07:40:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519918843; cv=none; d=google.com; s=arc-20160816; b=dPt2pwOWU/zY2wULJvMIgOvlZS27Wg2mevlgnZ3wVwWj9VSQqGHxWo275lVEqf0FYw eTZJpUE9uq+scobPYjgpDUWtQoIGrw8rSK9uOCHnmWTQlQeMmBE7JsyYctBCH2fATOx/ sF0ljcJEOEhubK4dX4iAW2VppV+yld9O5HjGq1KYNwALmkJJXa5F+qs8iqma3Zb3kaSq x+bzIIQaTQojADW9PwDrGmoGtQJxmVNKpV6DN+qmWElOY0b3h/faL7Pvv+jYp6lLxsf3 Fw/t/9yLRVT3veBNA78foPfjj0c+5fxFAfSNjXteJhA1wdVSGhLup9yol3nyToxTMOOb HK1A== 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=rBLDM1+wsDcv2QmBsP3hpgyjp1Qp5dErCcTqeDT2g4M=; b=QQCPGq6hEQGqRYsFJuvUKP+cfqH+1rm3/kmR3PiTOGG2ybrKzzlcUIz8vYI2U9EZKh nKt2wARzZ9aZWWKXBnlC9VuKhTvC9iyamGKuZn5v3bWHcslWfRtdGK9fK0tJjgwdAg4I /bxgW7ZYTrwBEQXGnaZIEa4mA8cKEF5NEWzlnwIXmk3wqKgjm8Oe8RmGv5yKmXOD7al+ FKun+rBRQAndczz0WZeqnAviD1rjgkdJnIgZSprF2Qo6bbnuRVpF9D+fuUKV8c9WlbXM 1K2Yp5dxQRHaRcOjFno35jTMwthSlwZa+QlsOxV+2vEsReJoeoNowO4uACmkUz6v0rw2 5Rpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=jVFNdR50; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 k9-v6si3262836plt.293.2018.03.01.07.40.43; Thu, 01 Mar 2018 07:40:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=jVFNdR50; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S1032017AbeCAPkm (ORCPT + 10 others); Thu, 1 Mar 2018 10:40:42 -0500 Received: from mail-dm3nam03on0131.outbound.protection.outlook.com ([104.47.41.131]:48288 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1032562AbeCAPji (ORCPT ); Thu, 1 Mar 2018 10:39:38 -0500 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=rBLDM1+wsDcv2QmBsP3hpgyjp1Qp5dErCcTqeDT2g4M=; b=jVFNdR50bMwt6VosZ7K/h+acCvGMy7uBk/ake/y15vzEU9gWnEXrcjsJAWbXM72hrANqUvwDKBRI85WSxqQWqsrux1HPkQsPNZouv5FxqHArltuyzsaZP1bq9a0IxM55NX38XDPWZJygcFaXXM+5RKrmLCZ+yY30t66S4a/1OEg= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1094.namprd21.prod.outlook.com (52.132.130.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.2; Thu, 1 Mar 2018 15:39:33 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0567.006; Thu, 1 Mar 2018 15:39:33 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Arnd Bergmann , Johannes Berg , Sasha Levin Subject: [added to the 4.1 stable tree] cfg80211: fix cfg80211_beacon_dup Thread-Topic: [added to the 4.1 stable tree] cfg80211: fix cfg80211_beacon_dup Thread-Index: AQHTsXHd7LvITw72W0y+wV+7pX4SQg== Date: Thu, 1 Mar 2018 15:27:53 +0000 Message-ID: <20180301152116.1486-507-alexander.levin@microsoft.com> References: <20180301152116.1486-1-alexander.levin@microsoft.com> In-Reply-To: <20180301152116.1486-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; DM5PR2101MB1094; 7:2db+pAHsanCK0bQDuSm7ToWkr2zVNYp5fKJoBMQHSvutnOlfr5hrrJ2Rw3AkpOCj0PrfiDrtTnGegMOjJiTN3S0zC637uT3VvYHF4gRZjQLIvggpHlVp24C94a+zqmWLKhXCoTrDQPTVoyHmJ59c2eLy0O+3qsZpIL13UNX+nAAOHHk8V21tdVnA26eDNJ0OZl4pf1sjEcUs5iZ2hiVF1y7s9aSUShZotflKqEyai6INoLDzbumZLqT4nxOb/zh3 x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 33d692c9-37bf-4f75-16d7-08d57f8aa16a x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020); SRVR:DM5PR2101MB1094; x-ms-traffictypediagnostic: DM5PR2101MB1094: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(9452136761055)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(3231220)(944501228)(52105095)(10201501046)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR2101MB1094; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1094; x-forefront-prvs: 05986C03E0 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(396003)(39380400002)(346002)(366004)(376002)(189003)(199004)(81156014)(3660700001)(81166006)(107886003)(6436002)(6486002)(59450400001)(53936002)(6512007)(97736004)(22452003)(305945005)(6506007)(14454004)(66066001)(8676002)(105586002)(68736007)(8936002)(2501003)(5250100002)(76176011)(4326008)(6666003)(2950100002)(72206003)(106356001)(110136005)(5660300001)(25786009)(54906003)(316002)(1076002)(26005)(3846002)(6116002)(15760500003)(2900100001)(6346003)(86612001)(99286004)(2906002)(102836004)(10290500003)(3280700002)(575784001)(36756003)(478600001)(10090500001)(86362001)(7736002)(186003)(22906009); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1094; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: 8sC4KCjZawg8k28G2kWj0qXma9PWTGAakCZnUVHZJ0STpf4NHoqx9UicFVaMftSERfK7W39jJqd1Rvprqz/xbm5IWRFXtcMZwj93xHrgR8KbMUy8c5k4TvbC/smtlk29F9Ry1EE+5GkL/3qqnGUm63dr3b2Utb0xACnAciFpzx0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 33d692c9-37bf-4f75-16d7-08d57f8aa16a X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2018 15:27:53.4246 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1094 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann This patch has been added to the 4.1 stable tree. If you have any objections, please let us know. -- 2.14.1 =============== [ Upstream commit bee92d06157fc39d5d7836a061c7d41289a55797 ] gcc-8 warns about some obviously incorrect code: net/mac80211/cfg.c: In function 'cfg80211_beacon_dup': net/mac80211/cfg.c:2896:3: error: 'memcpy' source argument is the same as destination [-Werror=restrict] >From the context, I conclude that we want to copy from beacon into new_beacon, as we do in the rest of the function. Cc: stable@vger.kernel.org Fixes: 73da7d5bab79 ("mac80211: add channel switch command and beacon callbacks") Signed-off-by: Arnd Bergmann Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 37e0aa4891a2..cd85cbf9bf39 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2857,7 +2857,7 @@ cfg80211_beacon_dup(struct cfg80211_beacon_data *beacon) } if (beacon->probe_resp_len) { new_beacon->probe_resp_len = beacon->probe_resp_len; - beacon->probe_resp = pos; + new_beacon->probe_resp = pos; memcpy(pos, beacon->probe_resp, beacon->probe_resp_len); pos += beacon->probe_resp_len; }