cxgb4: avoid accessing registers when clearing filters
[ Upstream commit88c380df84] Hardware register having the server TID base can contain invalid values when adapter is in bad state (for example, due to AER fatal error). Reading these invalid values in the register can lead to out-of-bound memory access. So, fix by using the saved server TID base when clearing filters. Fixes:b1a79360ee("cxgb4: Delete all hash and TCAM filters before resource cleanup") Signed-off-by: Raju Rangoju <rajur@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a5212518b7
commit
02f03883fd
1 changed files with 1 additions and 1 deletions
|
|
@ -1042,7 +1042,7 @@ void clear_all_filters(struct adapter *adapter)
|
|||
cxgb4_del_filter(dev, f->tid, &f->fs);
|
||||
}
|
||||
|
||||
sb = t4_read_reg(adapter, LE_DB_SRVR_START_INDEX_A);
|
||||
sb = adapter->tids.stid_base;
|
||||
for (i = 0; i < sb; i++) {
|
||||
f = (struct filter_entry *)adapter->tids.tid_tab[i];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue