From: Arnd Bergmann <arnd@arndb.de>
To: Johannes Berg <johannes@sipsolutions.net>,
"David S. Miller" <davem@davemloft.net>
Cc: "Martin Sebor" <msebor@gcc.gnu.org>,
"Arnd Bergmann" <arnd@arndb.de>,
stable@vger.kernel.org, "Luca Coelho" <luciano.coelho@intel.com>,
"Peter Große" <pegro@friiks.de>,
"Simon Wunderlich" <sw@simonwunderlich.de>,
"Benjamin Berg" <benjamin@sipsolutions.net>,
"Mohammed Shafi Shajakhan" <mohammed@qti.qualcomm.com>,
"Andrew Zaborowski" <andrew.zaborowski@intel.com>,
"Arend Van Spriel" <arend.vanspriel@broadcom.com>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] cfg80211: fix cfg80211_beacon_dup
Date: Fri, 2 Feb 2018 16:31:23 +0100 [thread overview]
Message-ID: <20180202153142.1142229-1-arnd@arndb.de> (raw)
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 <arnd@arndb.de>
---
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 46028e12e216..f4195a0f0279 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2892,7 +2892,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;
}
--
2.9.0
reply other threads:[~2018-02-02 15:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180202153142.1142229-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=andrew.zaborowski@intel.com \
--cc=arend.vanspriel@broadcom.com \
--cc=benjamin@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
--cc=mohammed@qti.qualcomm.com \
--cc=msebor@gcc.gnu.org \
--cc=netdev@vger.kernel.org \
--cc=pegro@friiks.de \
--cc=stable@vger.kernel.org \
--cc=sw@simonwunderlich.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®