Skip to contentSkip to conversation

rxrpc: Fix error when reading rxrpc tokens

PATCH Applied David Howells 2 participants 2 messages Apr 21, 2023 – Apr 23, 2023

Subsystems (3)
lore
Share & tools
lore

David Howells

author maintainer
#0 lore raw

PATCH 1/1 rxrpc: Fix error when reading rxrpc tokens

From: Marc Dionne <[email protected]>

When converting from ASSERTCMP to WARN_ON, the tested condition must be inverted, which was missed for this case.

This would cause an EIO error when trying to read an rxrpc token, for instance when trying to display tokens with AuriStor's "tokens" command.

Fixes 84924aac08a4 ("rxrpc: Fix checker warning")
cc "David S. Miller" <[email protected]>
cc Eric Dumazet <[email protected]>
cc Jakub Kicinski <[email protected]>
cc Paolo Abeni <[email protected]>
---
 net/rxrpc/key.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/rxrpc/key.c +1 -1
index 8d53aded09c4..33e8302a79e3 100644
@@ -680,7 +680,7 @@ static long rxrpc_read(const struct key *key,
 			return -ENOPKG;
 		}
 
-		if (WARN_ON((unsigned long)xdr - (unsigned long)oldxdr ==
+		if (WARN_ON((unsigned long)xdr - (unsigned long)oldxdr !=
 			    toksize))
 			return -EIO;
 	}
#1 lore raw
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:

Quoted 9 lines · On Fri, 21 Apr 2023 17:16:17 +0100 you wrote:

From: Marc Dionne <[email protected]>

When converting from ASSERTCMP to WARN_ON, the tested condition must be inverted, which was missed for this case.

This would cause an EIO error when trying to read an rxrpc token, for instance when trying to display tokens with AuriStor's "tokens" command.

[...]

Here is the summary with links:
- [net] rxrpc: Fix error when reading rxrpc tokens

    https://git.kernel.org/netdev/net/c/fadfc57cc804

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html