From: reinette chatre <reinette.chatre@intel.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"johill@sipsolutions.net" <johill@sipsolutions.net>,
Adel Gadllah <adel.gadllah@gmail.com>
Subject: Re: [PATCH] iwlagn: Change the TPT calculations sanity-check to WARN_ON
Date: Mon, 03 May 2010 10:48:54 -0700 [thread overview]
Message-ID: <1272908934.7879.5748.camel@rchatre-DESK> (raw)
In-Reply-To: <1272907549-25847-1-git-send-email-linville@tuxdriver.com>
On Mon, 2010-05-03 at 10:25 -0700, John W. Linville wrote:
> From: Adel Gadllah <adel.gadllah@gmail.com>
>
> Currently it is a BUG_ON() which will hang the machine once triggered.
>
> (Changed from WARN_ON to WARN_ON_ONCE. -- JWL)
>
> Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
I can see a potential race condition here in the calculation of the
average throughput so a BUG_ON seems extreme.
I looked at the history of this code and it seems as though the BUG_ON was
added as a sidenote to a patch implementing something else.
The patch adding this BUG_ON is:
commit 3110bef78cb4282c58245bc8fd6d95d9ccb19749
Author: Guy Cohen <guy.cohen@intel.com>
Date: Tue Sep 9 10:54:54 2008 +0800
iwlwifi: Added support for 3 antennas
... and it thus seems as though this BUG_ON was added along the way while doing
something else ... especially considering that the comments describing the
original code has not been removed yet. Since the current code still contains:
/* Else we have enough samples; calculate estimate of
* actual average throughput */
.. .which is obviously not done right now.
I looked at the original code and think we can revert the portion of this patch
adding the BUG_ON. Since users have not encountered the error I assume the
author considered that a BUG_ON was warranted, but now we know that users do
indeed encounter the error and we should return the original code.
I'll send the revert as a separate patch.
Reinette
next prev parent reply other threads:[~2010-05-03 17:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-03 17:25 [PATCH] iwlagn: Change the TPT calculations sanity-check to WARN_ON John W. Linville
2010-05-03 17:48 ` reinette chatre [this message]
2010-05-03 17:55 ` [PATCH] iwlwifi: recalculate average tpt if not current reinette chatre
2010-05-06 16:11 ` reinette chatre
2010-05-06 18:22 ` John W. Linville
2010-05-06 18:50 ` reinette chatre
2010-05-03 20:29 ` [PATCH] iwlagn: Change the TPT calculations sanity-check to WARN_ON Kalle Valo
2010-05-03 20:48 ` Gábor Stefanik
2010-05-03 21:01 ` Pavel Roskin
2010-05-03 21:10 ` Adel Gadllah
2010-05-03 21:20 ` Gábor Stefanik
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=1272908934.7879.5748.camel@rchatre-DESK \
--to=reinette.chatre@intel.com \
--cc=adel.gadllah@gmail.com \
--cc=johill@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox