mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-26 04:20:23 +09:00
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:
committed by
Greg Kroah-Hartman
parent
a5212518b7
commit
02f03883fd
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user