cxgb4vf: Fix off-by-one error checking for the end of the mailbox delay array
Subsystems (2)
PATCH 1/3 cxgb4vf: Fix off-by-one error checking for the end of the mailbox delay array
Quoted 1 line
From
1d32860335fad8c67e23254aec7c30750276f2b4Mon Sep 17 00:00:00 2001
From: Casey Leedom <[email protected]>
Date: Mon, 19 Jul 2010 17:51:46 -0700
Subject: [PATCH net-next 1/3] cxgb4vf: Fix off-by-one error checking for the end of the mailbox delay array
Fix off-by-one error in checking for the end of the mailbox response delay array. We ended up walking off the end and, if we were unlucky, we'd end up pulling in a 0 and never terminate the mailbox response delay loop ...
--- drivers/net/cxgb4vf/t4vf_hw.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/cxgb4vf/t4vf_hw.c +1 -1
@@ -163,7 +163,7 @@ int t4vf_wr_mbox_core(struct adapter *adapter, const void *cmd, int size,for (i =0 ; i <500 ; i += ms) {if (sleep_ok) { ms = delay[delay_idx]; -if (delay_idx <ARRAY_SIZE (delay)) +if (delay_idx <ARRAY_SIZE (delay) -1 ) delay_idx++;msleep (ms); }else
Signature · 1 line
1.7.0.4
From: Casey Leedom <[email protected]>
Date: Tue, 20 Jul 2010 08:58:52 -0700
Quoted 10 lines
Quoted 1 line
From
1d32860335fad8c67e23254aec7c30750276f2b4Mon Sep 17 00:00:00 2001From: Casey Leedom <[email protected]>
Date: Mon, 19 Jul 2010 17:51:46 -0700
Subject: [PATCH net-next 1/3] cxgb4vf: Fix off-by-one error checking for the end of the mailbox delay arrayFix off-by-one error in checking for the end of the mailbox response delay array. We ended up walking off the end and, if we were unlucky, we'd end up pulling in a 0 and never terminate the mailbox response delay loop ...
Signed-off-by Casey Leedom <[email protected]>
Applied.