diff options
author | Denis Bolotin <denis.bolotin@cavium.com> | 2018-11-08 16:46:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-08 19:38:18 -0800 |
commit | 2632f22ebd08da249c2017962a199a0cfb2324bf (patch) | |
tree | cc1007ec2b0413ff2c19d11af593a9cb768f3855 /drivers/net/ethernet/qlogic/qed/qed_sp.h | |
parent | 39477551df940ddb1339203817de04f5caaacf7a (diff) | |
download | linux-stable-2632f22ebd08da249c2017962a199a0cfb2324bf.tar.gz linux-stable-2632f22ebd08da249c2017962a199a0cfb2324bf.tar.bz2 linux-stable-2632f22ebd08da249c2017962a199a0cfb2324bf.zip |
qed: Fix blocking/unlimited SPQ entries leak
When there are no SPQ entries left in the free_pool, new entries are
allocated and are added to the unlimited list. When an entry in the pool
is available, the content is copied from the original entry, and the new
entry is sent to the device. qed_spq_post() is not aware of that, so the
additional entry is stored in the original entry as p_post_ent, which can
later be returned to the pool.
Signed-off-by: Denis Bolotin <denis.bolotin@cavium.com>
Signed-off-by: Michal Kalderon <michal.kalderon@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_sp.h')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_sp.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_sp.h b/drivers/net/ethernet/qlogic/qed/qed_sp.h index e95431f6acd4..04259df8a5c2 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_sp.h +++ b/drivers/net/ethernet/qlogic/qed/qed_sp.h @@ -167,6 +167,9 @@ struct qed_spq_entry { enum spq_mode comp_mode; struct qed_spq_comp_cb comp_cb; struct qed_spq_comp_done comp_done; /* SPQ_MODE_EBLOCK */ + + /* Posted entry for unlimited list entry in EBLOCK mode */ + struct qed_spq_entry *post_ent; }; struct qed_eq { |