linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com, nbd@openwrt.org
Subject: Re: [PATCH 1/3] mac80211: Minor optimization in minstrel_ht tx status path
Date: Wed, 16 Nov 2011 16:39:30 +0100	[thread overview]
Message-ID: <20111116153929.GA5490@redhat.com> (raw)
In-Reply-To: <1321280900-24006-1-git-send-email-helmut.schaa@googlemail.com>

On Mon, Nov 14, 2011 at 03:28:18PM +0100, Helmut Schaa wrote:
> @@ -421,8 +421,8 @@ minstrel_ht_tx_status(void *priv, struct ieee80211_supported_band *sband,
>  		mi->sample_packets += info->status.ampdu_len;
>  
>  	for (i = 0; !last; i++) {
> -		last = (i == IEEE80211_TX_MAX_RATES - 1) ||
> -		       !minstrel_ht_txstat_valid(&ar[i + 1]);
> +		last = !minstrel_ht_txstat_valid(&ar[i + 1]) ||
> +		       (i == IEEE80211_TX_MAX_RATES - 1);
This make possible that we read outsite from ar[] border. Normally 
that should not couse any troubles, but I think it could confuse
something like kmemcheck. Perhaps whould be better to just add
unlikely(i == IEEE80211_TX_MAX_RATES - 1) ?

Stanislaw

  parent reply	other threads:[~2011-11-16 15:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14 14:28 [PATCH 1/3] mac80211: Minor optimization in minstrel_ht tx status path Helmut Schaa
2011-11-14 14:28 ` [PATCH 2/3] mac80211: Check rate->idx before rate->count Helmut Schaa
2011-11-14 14:28   ` [PATCH 3/3] mac80211: Get rid of search loop for rate group index Helmut Schaa
2011-11-14 14:40     ` Felix Fietkau
2011-11-16 15:39 ` Stanislaw Gruszka [this message]
2011-11-16 16:02   ` [PATCH 1/3] mac80211: Minor optimization in minstrel_ht tx status path Helmut Schaa

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=20111116153929.GA5490@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=helmut.schaa@googlemail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=nbd@openwrt.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).