Skip to content

Commit

Permalink
rxrpc: Fix error when reading rxrpc tokens
Browse files Browse the repository at this point in the history
[ Upstream commit fadfc57 ]

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: 84924aa ("rxrpc: Fix checker warning")
Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: "David S. Miller" <davem@davemloft.net>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: linux-afs@lists.infradead.org
cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Marc Dionne authored and gregkh committed May 11, 2023
1 parent 9e3c96a commit 12972ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/rxrpc/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 12972ae

Please sign in to comment.