All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mohammed Shafi <shafi.wireless@gmail.com>
To: MR <g7af0ec1e3ea1e7b1@nextmail.ru>
Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: ath9k crash 3.2-rc7
Date: Fri, 6 Jan 2012 20:11:59 +0530	[thread overview]
Message-ID: <CAD2nsn3+AWwz1=h9mXR1S5S5ioydHTBzeoWd7wrgh9jnp_hQTA@mail.gmail.com> (raw)
In-Reply-To: <CAD2nsn0PJU+ZuZfuVOzsvN0yq76JdgYpwkoeS8yfvKQSiO8VfA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]

On Fri, Jan 6, 2012 at 8:05 PM, Mohammed Shafi <shafi.wireless@gmail.com> wrote:
> 2012/1/6 MR <g7af0ec1e3ea1e7b1@nextmail.ru>:
>>  >:(  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

[-- Attachment #2: remove-suspicious-code.patch --]
[-- Type: text/x-diff, Size: 1510 bytes --]

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

  reply	other threads:[~2012-01-06 14:42 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-06 12:51 ath9k crash 3.2-rc7 MR
2012-01-06 14:35 ` Mohammed Shafi
2012-01-06 14:41   ` Mohammed Shafi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-26 22:19 MR
2012-01-20  4:42 MR
2012-01-20  5:16 ` Mohammed Shafi
2012-01-18 17:30 MR
2012-01-17 18:53 MR
2012-01-18  5:32 ` Mohammed Shafi
2012-01-16 15:52 MR
2012-01-12 18:04 MR
2012-01-11 17:20 MR
2012-01-12  6:06 ` Mohammed Shafi
2012-01-10 18:14 MR
2012-01-11 15:26 ` Mohammed Shafi
2012-01-09 11:11 MR
2012-01-09  7:40 MR
2012-01-09  7:57 ` Mohammed Shafi
2012-01-09  7:05 MR
2012-01-09  7:30 ` Mohammed Shafi
2012-01-08  7:19 MR
2012-01-09  5:11 ` Mohammed Shafi
2012-01-07 12:11 MR
2012-01-06 20:55 MR
2012-01-07 11:48 ` Mohammed Shafi
2012-01-06 14:46 MR
2012-01-06 14:50 ` Mohammed Shafi
2012-01-06  8:10 MR
2012-01-06  8:01 MR
2012-01-06  9:02 ` Mohammed Shafi
     [not found] <NEXT-4f069dda9267d2.27061318@nextmail.ru>
     [not found] ` <CAD2nsn3i=HTP6zOEADMx35rOYXDofo7YG+0zCGH36XgZFLfOww@mail.gmail.com>
2012-01-06  7:49   ` Mohammed Shafi
2012-01-05 18:52 MR
2012-01-05 16:32 MR
2012-01-05  6:59 MR
2012-01-05 15:30 ` Mohammed Shafi
2012-01-04 21:18 MR
2012-01-04 21:28 ` John W. Linville
2012-01-05  6:29   ` Mohammed Shafi

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='CAD2nsn3+AWwz1=h9mXR1S5S5ioydHTBzeoWd7wrgh9jnp_hQTA@mail.gmail.com' \
    --to=shafi.wireless@gmail.com \
    --cc=g7af0ec1e3ea1e7b1@nextmail.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /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 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.