]> git.ipfire.org Git - people/ms/linux.git/commit
netxen: Correct off-by-one errors in bounds checks
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 20 Dec 2013 04:10:44 +0000 (15:10 +1100)
committerJiri Slaby <jslaby@suse.cz>
Tue, 26 Aug 2014 12:12:19 +0000 (14:12 +0200)
commit465a844d10e4f4ba2f6bf0a2f4833d65ea08097c
tree67ba5c89f2d75e45b7d59047c90a082e5abedd69
parent854ad0a065a8cd0136533b29478ba2cf658c87a3
netxen: Correct off-by-one errors in bounds checks

commit 4710b2ba873692194c636811ceda398f95e02db2 upstream.

netxen_process_lro() contains two bounds checks.  One for the ring number
against the number of rings, and one for the Rx buffer ID against the
array of receive buffers.

Both of these have off-by-one errors, using > instead of >=. The correct
versions are used in netxen_process_rcv(), they're just wrong in
netxen_process_lro().

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c