Subject: Re: [patch] iwlwifi: testing the wrong variable

From: "John W. Linville" <[email-masked]>
Date: Fri, 19 Feb 2010 15:30:39 -0500

On Thu, Feb 18, 2010 at 10:04:42AM -0800, reinette chatre wrote:
> On Thu, 2010-02-18 at 01:45 -0800, Dan Carpenter wrote:
> > The first one fixes a smatch false positive and the second one fixes
> > a potential bug.
> > 
> > drivers/net/wireless/iwlwifi/iwl-5000.c +786 iwl5000_txq_update_byte_cnt_tbl(37) error: buffer overflow 
> > '(scd_bc_tbl+txq_id)->tfd_offset' 320 <= 512
> > drivers/net/wireless/iwlwifi/iwl-5000.c +808 iwl5000_txq_inval_byte_cnt_tbl(19) error: buffer overflow 
> > '(scd_bc_tbl+txq_id)->tfd_offset' 320 <= 512
> > 
> > Signed-off-by: Dan Carpenter <[email-masked]>
> > Cc: [email-masked]
> > ---
> 
> This has already been fixed by patch below (taken from
> wireless-next-2.6). John and Greg, could you please pick this one up for
> 2.6.33 and stable instead?
> 
> commit 8ce1ef4a914aef8b9b90a2a2c670494168a2cca9
> Author: Wey-Yi Guy <[email-masked]>
> Date:   Fri Jan 8 10:04:44 2010 -0800
> 
>     iwlwifi: fix bug in tx byte count table
>     
>     When setting invalid byte count in txq byte count table, read
> pointer
>     should be used instead of write pointer.
>     
>     Reported-by: Guo, Chaohong <[email-masked]>
>     Signed-off-by: Wey-Yi Guy <[email-masked]>
>     Signed-off-by: Zhu Yi <[email-masked]>
>     Signed-off-by: Reinette Chatre <[email-masked]>
>     Signed-off-by: John W. Linville <[email-masked]>

So for the record, that patch is basically identical to Dan's patch
but with some whitespace fixups in some nearby lines as well.

How important is this patch?  Is there an actual bug report?  Is it
a regression?

It is very late in the 2.6.33 cycle and it isn't obvious to me that
this is worth pushing for 2.6.33 at this point...?

John
-- 
John W. Linville		Someday the world will need a hero, and you
[email-masked]			might be all we have.  Be ready.