summaryrefslogtreecommitdiff
path: root/net/wireless/trace.h
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2014-07-17 15:00:56 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-08-07 14:52:36 -0700
commita09c414618fc7587eac9e101602fd213ee4c1549 (patch)
treed9c131a3db21af98d0eada9bb1cfce15c5b424dc /net/wireless/trace.h
parentb3621670c78d883d86a173bbb30a4effe9eb69fb (diff)
downloadlwn-a09c414618fc7587eac9e101602fd213ee4c1549.tar.gz
lwn-a09c414618fc7587eac9e101602fd213ee4c1549.zip
cfg80211: fix mic_failure tracing
commit 8c26d458394be44e135d1c6bd4557e1c4e1a0535 upstream. tsc can be NULL (mac80211 currently always passes NULL), resulting in NULL-dereference. check before copying it. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/wireless/trace.h')
-rw-r--r--net/wireless/trace.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index fbcc23edee54..b89eb3990f0a 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -2068,7 +2068,8 @@ TRACE_EVENT(cfg80211_michael_mic_failure,
MAC_ASSIGN(addr, addr);
__entry->key_type = key_type;
__entry->key_id = key_id;
- memcpy(__entry->tsc, tsc, 6);
+ if (tsc)
+ memcpy(__entry->tsc, tsc, 6);
),
TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,