]> www.infradead.org Git - users/jedix/linux-maple.git/commit
be2net: Avoid accessing eq object in be_msix_register routine, when i < 0.
authorVenkat Duvvuru <venkatkumar.duvvuru@avagotech.com>
Thu, 17 Dec 2015 20:10:50 +0000 (01:40 +0530)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 10 Mar 2016 15:15:11 +0000 (07:15 -0800)
commit09efa017fe350578d397228217ba7fc602702de0
tree4853f3ff6eb4fe089846ac5928ac825c35bd2684
parent2afd682487f9970e820854e68c005582c589779a
be2net: Avoid accessing eq object in be_msix_register routine, when i < 0.

When the first request_irq fails in be_msix_register, i value
would be zero. The current code decrements the i value and
accesses the eq object without validating the decremented
"i" value. This can cause an "invalid memory address access"
violation.

This patch fixes the problem by accessing the eq object after
validating the "i" value.

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com>
Orabug: 22725582
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
drivers/net/ethernet/emulex/benet/be_main.c