Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2437716imm; Thu, 7 Jun 2018 10:33:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIJhNRGdHwEgOCcvSeyOX6+9rk7u2tZoxVmvEZqFZEJ+aGvfR3GC0i+LudKO4DlAnVN60pP X-Received: by 2002:a65:554b:: with SMTP id t11-v6mr2386142pgr.130.1528392798528; Thu, 07 Jun 2018 10:33:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528392798; cv=none; d=google.com; s=arc-20160816; b=CXCKXGiGN+gLuVclzOqG3k+Tdb3H5Acn0mHELUwpOO/j/4wlgGUtzpv2cNFEzuPE93 JTqQmlb4EeEVwLuvF0+mEhqfoEJkB5nIgi8kH+1AjGKBUTZKz1mrJApz5PzowrFkybR/ QUoSaQ0Z9IR0PZhpw8QWdmPVSVgC1I175ngnnAYdqf4jbzI/OUjo8da2Eb+/lEcJZIsH i+m53k/uPSIaPVIMT+4uyDbKW8kkdPGpkIlyuehaE4Qn8qiha96EDNJEON+Wd2EeSues ZL5kvoxll6b/j0Fy64b+WHhjHSKkHY2Mn5yojllimtPwtI8X3Acq23YbjfGbmsveGXVY 9+9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=cT+3O/y5M4Loh4g7i7i6WPxVXNvGP0IolbyxjusLFhU=; b=iKIOKdvteg5H4co4tdX9kEjEFRXij6Wqjw3mlL0qv8vCfSX9i03XiVSXdGbp8t0vT/ G131jUMy7CyyIl4ZPqP122OXLJMmM/wwlOjUIOzXaSlAt9uYCeZD2umfiuqB/oBK790a QyJTdhRq7P5VfSZXMbA00Qp1IXsHsGneAVexunx7damgtUQGGgVGZwaEEwr3sH3Q2Lgg /ZH7zUCJB1WGoIEEinyhynttOR3Ti0D/fPmdhmu+PpLfayB8XpMESKAbISlwcAkXFMLa BG+oyL/oUa7Oi2z2fQTNMSdIePENaSTiAeh7cVm9wgb31PVyidY5T2SGOtJvas60BEwR RIog== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 61-v6si55115575plf.63.2018.06.07.10.33.03; Thu, 07 Jun 2018 10:33:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934332AbeFGOjp (ORCPT + 99 others); Thu, 7 Jun 2018 10:39:45 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:40510 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933671AbeFGOjn (ORCPT ); Thu, 7 Jun 2018 10:39:43 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvba-0005Zv-IG; Thu, 07 Jun 2018 15:09:34 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvb8-00035i-Qg; Thu, 07 Jun 2018 15:09:06 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Johannes Berg" , "Arnd Bergmann" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 263/410] cfg80211: fix cfg80211_beacon_dup In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit bee92d06157fc39d5d7836a061c7d41289a55797 upstream. 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] =46romthe context, I conclude that we want to copy from beacon into new_beacon, as we do in the rest of the function. Fixes: 73da7d5bab79 ("mac80211: add channel switch command and beacon callbacks") Signed-off-by: Arnd Bergmann Signed-off-by: Johannes Berg Signed-off-by: Ben Hutchings --- net/mac80211/cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3054,7 +3054,7 @@ cfg80211_beacon_dup(struct cfg80211_beac } 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; }