Skip to content

Commit

Permalink
Revert "iwmc3200wifi: fix array out-of-boundary access"
Browse files Browse the repository at this point in the history
This reverts commit 6c853da.

From Message-ID: <1262663293.551.117.camel@debian>
On Sat, 2010-01-02 at 22:09 +0800, Dan Carpenter wrote:
> It don't think 6c853da is right.  That's the patch
> titled "iwmc3200wifi: fix array out-of-boundary access"
>
>       Allocate priv->rx_packets[IWM_RX_ID_HASH + 1] because the max array
>       index is IWM_RX_ID_HASH according to IWM_RX_ID_GET_HASH().
>
> In 2.6.33-rc2 IWM_RX_ID_GET_HASH() doesn't go as high as IWM_RX_ID_HASH
> and I don't see any array out-of-bounds.
>
> #define IWM_RX_ID_GET_HASH(id) ((id) % IWM_RX_ID_HASH)

Ah, you are right. I took '%' for '&'. John, would you revert it? Sorry
for the false alarm.

Thanks,
-yi

Reported-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
John W. Linville committed Jan 14, 2010
1 parent a5fb297 commit 79b6a51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwmc3200wifi/iwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ struct iwm_priv {

struct sk_buff_head rx_list;
struct list_head rx_tickets;
struct list_head rx_packets[IWM_RX_ID_HASH + 1];
struct list_head rx_packets[IWM_RX_ID_HASH];
struct workqueue_struct *rx_wq;
struct work_struct rx_worker;

Expand Down

0 comments on commit 79b6a51

Please sign in to comment.