Commit fadfc57c authored by Marc Dionne's avatar Marc Dionne Committed by David S. Miller
Browse files

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: 84924aac ("rxrpc: Fix checker warning")
Signed-off-by: default avatarMarc Dionne <marc.dionne@auristor.com>
Signed-off-by: default avatarDavid 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: default avatarDavid S. Miller <davem@davemloft.net>
parent b148b9ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}