Search Linux Wireless

Re: ath9k crash 3.2-rc7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 6, 2012 at 8:05 PM, Mohammed Shafi <shafi.wireless@xxxxxxxxx> wrote:
> 2012/1/6 MR <g7af0ec1e3ea1e7b1@xxxxxxxxxxx>:
>>  >:(  i had put those warnings to prevent the crash itself and what's causing
>>  >it.
>>  > may be i had missed that pos can be < 0 in addition to (pos > 37).
>>  > i am just looking at those areas of code for some other issue. hope i
>>  > can a find a fix
>>  > for both of them
>>
>> I am building kernel with pos<0 check added...
>
> thanks!  if it does not works, i have only one more idea(a patch
> which removes some suspicious code which abuses a pointer any way that
> has to be fixed properly ). otherwise i need to recreate the issue and
> capture the stack trace completely, put debug prints. i ran an
> overnight test but was unable to recreate the issue. later today AN  i
> got a crash accidentally but only once, after that never.

attaching the patch for your reference, but this is not the fix. it
has to be fixed properly.
if it does not helps, then the issue itself is something else i had assumed.

>
>>
>> I hoped for some ad-hoc stress-test recommendation, but I guess this will have
>> to wait.

any test if we can recreate the panic ASAP will be highly helpful. it
will help us narrow down the issue quickly and put more debug
prints/ideas

>>
>>
>
>
>
> --
> shafi



-- 
shafi
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index e267c92..a39cbdc 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1629,7 +1629,6 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
 
 	if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
 		struct ieee80211_channel *curchan = hw->conf.channel;
-		struct ath9k_channel old_chan;
 		int pos = curchan->hw_value;
 		int old_pos = -1;
 		unsigned long flags;
@@ -1645,25 +1644,15 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
 		ath_dbg(common, CONFIG, "Set channel: %d MHz type: %d\n",
 			curchan->center_freq, conf->channel_type);
 
+		ath9k_cmn_update_ichannel(&sc->sc_ah->channels[pos],
+					  curchan, conf->channel_type);
+
 		/* update survey stats for the old channel before switching */
 		spin_lock_irqsave(&common->cc_lock, flags);
 		ath_update_survey_stats(sc);
 		spin_unlock_irqrestore(&common->cc_lock, flags);
 
 		/*
-		 * Preserve the current channel values, before updating
-		 * the same channel
-		 */
-		if (old_pos == pos) {
-			memcpy(&old_chan, &sc->sc_ah->channels[pos],
-				sizeof(struct ath9k_channel));
-			ah->curchan = &old_chan;
-		}
-
-		ath9k_cmn_update_ichannel(&sc->sc_ah->channels[pos],
-					  curchan, conf->channel_type);
-
-		/*
 		 * If the operating channel changes, change the survey in-use flags
 		 * along with it.
 		 * Reset the survey data for the new channel, unless we're switching

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux