exynos: Store mwifiex_ds_misc_subsc_evt in mwifiex_private
authorJeff Disher <disher@chromium.org>
Mon, 27 Aug 2012 15:33:50 +0000 (11:33 -0400)
committerGerrit <chrome-bot@google.com>
Tue, 28 Aug 2012 18:34:04 +0000 (11:34 -0700)
commit72aeadc0f6c5123ba67acd2422a22b1d2db558f8
treea7e65660c0943696764fc57e82fedda8e9629475
parent6cc54365a36d8a93b43fe808ed4f4f2a0c7eb9bf
exynos: Store mwifiex_ds_misc_subsc_evt in mwifiex_private

Since mwifiex_ds_misc_subsc_evt is used in an asynchronous case, store
the structure in the long-lived mwifiex_private instead of on the
calling stack.
Ideally, we would use this storage for the synchronous case, as well,
and explicitly clear the buffer on the "end" of the operation such that
we could prove only one message was in flight and that we were never
corrupting another.  That would require a more invasive change to create
such an "end".
This fixes a problem where the response of the asynchronous operation
would corrupt a stack frame potentially in use by a different thread.

BUG=chrome-os-partner:12367
TEST=Walked back and forth between Wifi access points on the same
network while poster circle was actively animating on the screen (this
constant flushing of KDS resources creates an easy-to-recognize panic
when this corruption occurs), watching the wifi reset without panic.

Change-Id: I06b9c522d1f50e0de1c5754399d154cfd93830a4
Signed-off-by: Jeff Disher <disher@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31473
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Commit-Ready: Jeff Disher <disher@chromium.org>
Tested-by: Jeff Disher <disher@chromium.org>
drivers/net/wireless/mwifiex/main.h
drivers/net/wireless/mwifiex/sta_cmdresp.c