All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3.1] iwlagn: fix stack corruption
@ 2011-09-12 19:08 Johannes Berg
  2011-09-12 19:14 ` Daniel Halperin
  2011-09-12 19:55 ` Alexander Diewald
  0 siblings, 2 replies; 6+ messages in thread
From: Johannes Berg @ 2011-09-12 19:08 UTC (permalink / raw)
  To: John Linville
  Cc: Wey-Yi W Guy, Meenakshi Venkataraman, Alexander Diewald,
	linux-wireless

From: Johannes Berg <johannes.berg@intel.com>

Alexander reported a strange crash in iwlagn that
Meenakshi and Wey couldn't reproduce. I just ran
into the same issue and tracked it down to stack
corruption. This fixes it.

The problem was introduced in
commit 4b8b99b6e650d0527f3a123744b7459976581d14
Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Date:   Fri Jul 8 14:29:48 2011 -0700

    iwlagn: radio sensor offset in le16 format

Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Cc: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Reported-by: Alexander Diewald <alex@diewald.cc>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
Wey, please fix your recent commit in our internal tree
that does the v2 offset calibration -- it has the same
bug twice.

 drivers/net/wireless/iwlwifi/iwl-agn-ucode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c	2011-09-12 21:01:34.000000000 +0200
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c	2011-09-12 21:01:43.000000000 +0200
@@ -167,7 +167,7 @@ static int iwlagn_set_temperature_offset
 
 	memset(&cmd, 0, sizeof(cmd));
 	iwl_set_calib_hdr(&cmd.hdr, IWL_PHY_CALIBRATE_TEMP_OFFSET_CMD);
-	memcpy(&cmd.radio_sensor_offset, offset_calib, sizeof(offset_calib));
+	memcpy(&cmd.radio_sensor_offset, offset_calib, sizeof(*offset_calib));
 	if (!(cmd.radio_sensor_offset))
 		cmd.radio_sensor_offset = DEFAULT_RADIO_SENSOR_OFFSET;
 



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-09-13  7:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-12 19:08 [PATCH 3.1] iwlagn: fix stack corruption Johannes Berg
2011-09-12 19:14 ` Daniel Halperin
2011-09-12 18:40   ` Guy, Wey-Yi
2011-09-12 19:24   ` Julia Lawall
2011-09-13  7:18   ` Johannes Berg
2011-09-12 19:55 ` Alexander Diewald

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.