aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Dionne <[email protected]>2023-04-21 17:16:17 +0100
committerDavid S. Miller <[email protected]>2023-04-23 13:38:28 +0100
commitfadfc57cc8047080a123b16f288b7138524fb1e2 (patch)
tree97242c199969950d5ce4c0764af27fc32d950df3
parentb148b9abc8444c9e0579a6bbe47b2da6adf5a150 (diff)
rxrpc: Fix error when reading rxrpc tokens
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") Signed-off-by: Marc Dionne <[email protected]> Signed-off-by: David Howells <[email protected]> cc: "David S. Miller" <[email protected]> cc: Eric Dumazet <[email protected]> cc: Jakub Kicinski <[email protected]> cc: Paolo Abeni <[email protected]> cc: [email protected] cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--net/rxrpc/key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rxrpc/key.c b/net/rxrpc/key.c
index 8d53aded09c4..33e8302a79e3 100644
--- a/net/rxrpc/key.c
+++ b/net/rxrpc/key.c
@@ -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;
}