Re: [PATCH] mctp: Fix incorrect tx flow invalidation condition in mctp-i2c
From: Jeremy Kerr
Date: Tue Mar 25 2025 - 04:31:13 EST
Hi Daniel,
> Previously, the condition for invalidating the tx flow in
> mctp_i2c_invalidate_tx_flow() checked if `rc` was nonzero.
> However, this could incorrectly trigger the invalidation
> even when `rc > 0` was returned as a success status.
Yes, and we should be seeing rc > 0 in normal behaviour...
> This patch updates the condition to explicitly check for `rc < 0`,
> ensuring that only error cases trigger the invalidation.
Looks good to me. I'll do some testing in my environment here, but in
the meantime:
Reviewed-by: Jeremy Kerr <jk@xxxxxxxxxxxxxxxxxxxx>
I figure you'll want to target the net (not net-next) tree, in which
case you'll probably need this:
Fixes: 338a93cf4a18 ("net: mctp-i2c: invalidate flows immediately on TX errors")
Thanks for the contribution.
Cheers,
Jeremy