summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cavium
diff options
context:
space:
mode:
authorJeremy Kerr <jk@codeconstruct.com.au>2022-11-10 13:31:35 +0800
committerJakub Kicinski <kuba@kernel.org>2022-11-11 20:13:27 -0800
commit9cbd48d5fa14e4c65f8580de16686077f7cea02b (patch)
treea64ba8233b1da9810f56c3ff7bc477d118a3ae5a /drivers/net/ethernet/cavium
parent0834ced65a6a1eaa10d0b319b685879a671b29aa (diff)
mctp i2c: don't count unused / invalid keys for flow release
We're currently hitting the WARN_ON in mctp_i2c_flow_release: if (midev->release_count > midev->i2c_lock_count) { WARN_ONCE(1, "release count overflow"); This may be hit if we expire a flow before sending the first packet it contains - as we will not be pairing the increment of release_count (performed on flow release) with the i2c lock operation (only performed on actual TX). To fix this, only release a flow if we've encountered it previously (ie, dev_flow_state does not indicate NEW), as we will mark the flow as ACTIVE at the same time as accounting for the i2c lock operation. We also need to add an INVALID flow state, to indicate when we've done the release. Fixes: f5b8abf9fc3d ("mctp i2c: MCTP I2C binding driver") Reported-by: Jian Zhang <zhangjian.3032@bytedance.com> Tested-by: Jian Zhang <zhangjian.3032@bytedance.com> Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://lore.kernel.org/r/20221110053135.329071-1-jk@codeconstruct.com.au Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/cavium')
0 files changed, 0 insertions, 0 deletions