linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: Ryder Lee <ryder.lee@mediatek.com>,
	kernel-janitors@vger.kernel.org, linux-wireless@vger.kernel.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-mediatek@lists.infradead.org, Roy Luo <royluo@google.com>,
	Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Felix Fietkau <nbd@nbd.name>
Subject: Re: [PATCH] mt76: Off by one in mt76_calc_rx_airtime()
Date: Tue, 26 Nov 2019 09:23:03 +0000	[thread overview]
Message-ID: <0101016ea7057599-4b9d94c8-f18d-4976-b7e0-a35a953f2653-000000@us-west-2.amazonses.com> (raw)
In-Reply-To: <87h82ryp45.fsf@toke.dk> ("Toke \=\?utf-8\?Q\?H\=C3\=B8iland-J\?\= \=\?utf-8\?Q\?\=C3\=B8rgensen\=22's\?\= message of "Tue, 26 Nov 2019 10:16:10 +0100")

Toke Høiland-Jørgensen <toke@redhat.com> writes:

> Dan Carpenter <dan.carpenter@oracle.com> writes:
>
>> On Tue, Nov 26, 2019 at 09:04:15AM +0100, Toke Høiland-Jørgensen wrote:
>>> Dan Carpenter <dan.carpenter@oracle.com> writes:
>>> 
>>> > @@ -242,7 +242,7 @@ u32 mt76_calc_rx_airtime(struct mt76_dev *dev, struct mt76_rx_status *status,
>>> >  			return 0;
>>> >  
>>> >  		sband = dev->hw->wiphy->bands[status->band];
>>> > -		if (!sband || status->rate_idx > sband->n_bitrates)
>>> > +		if (!sband || status->rate_idx >= sband->n_bitrates)
>>> >  			return 0;
>>> >  
>>> >  		rate = &sband->bitrates[status->rate_idx];
>>> 
>>> This code has recently been ported to mac80211 (net/mac80211/airtime.c).
>>> It seems that the bug is also present there; care to send a patch for
>>> that as well? :)
>>
>> Oh.  Thanks for pointing that out.  I actually saw the static checker
>> warning for that and ignored it thinking that it was the same code.
>> :P
>
> Well, it's copy-pasted from the same code ;)
>
> The plan is to get rid of the version inside mt76; was waiting for the
> trees to converge, though, so I guess after the merge window?

Yup, as I'm not taking anything to w-d-next until -rc1 is released.

-- 
Kalle Valo

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

  reply	other threads:[~2019-11-26  9:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26  4:49 [PATCH] mt76: Off by one in mt76_calc_rx_airtime() Dan Carpenter
2019-11-26  5:21 ` Kalle Valo
2019-11-26  5:25 ` Markus Theil
2019-11-26  8:04 ` Toke Høiland-Jørgensen
2019-11-26  9:11   ` Dan Carpenter
2019-11-26  9:16     ` Toke Høiland-Jørgensen
2019-11-26  9:23       ` Kalle Valo [this message]
2019-11-26 12:09   ` [PATCH] mac80211: airtime: Fix an off by one in ieee80211_calc_rx_airtime() Dan Carpenter
2019-11-26 12:39     ` Toke Høiland-Jørgensen
2019-12-18 18:51 ` [PATCH] mt76: Off by one in mt76_calc_rx_airtime() Kalle Valo

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=0101016ea7057599-4b9d94c8-f18d-4976-b7e0-a35a953f2653-000000@us-west-2.amazonses.com \
    --to=kvalo@codeaurora.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi83@gmail.com \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=royluo@google.com \
    --cc=ryder.lee@mediatek.com \
    --cc=toke@redhat.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;
as well as URLs for NNTP newsgroup(s).