Re: [patch] bnx2x: off by one in bnx2x_ets_e3b0_sp_pri_to_cos_set()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Wed, 2012-04-18 at 09:53 +0300, Dan Carpenter wrote:
> The sp_pri_to_cos[] array size depends on the config but lets say it is
> BX_E3B0_MAX_NUM_COS_PORT0 and max_num_of_cos is also
> DCBX_E3B0_MAX_NUM_COS_PORT0.  In the original code
> "pri == max_num_of_cos" was accepted but it is one past the end of the
> array.
> 
> Also we used "pri" before capping it.  It's a harmless read past the end
> of the array, but it would affect which error message gets printed.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 

Acked-by: Eilon Greenstein <eilong@xxxxxxxxxxxx>

Thanks Dan - this is obviously better.



--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]     [Free Dating]

Add to Google Powered by Linux