mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
cxgb4: avoid accessing registers when clearing filters
[ Upstream commit 88c380df84fbd03f9b137c2b9d0a44b9f2f553b0 ]
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
68b5fc6ec5
commit
0bf49b3c8d
1 changed files with 1 additions and 1 deletions
|
|
@ -778,7 +778,7 @@ void clear_all_filters(struct adapter *adapter)
|
|||
cxgb4_del_filter(dev, i, &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…
Reference in a new issue