]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Added missing check of msg length in verifying its signature
authorPaul Blakey <paulb@mellanox.com>
Thu, 18 Aug 2016 18:09:05 +0000 (21:09 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Aug 2016 23:09:55 +0000 (16:09 -0700)
commit8fa37680130fcf7be6662826df9e1ceaf5502171
tree282b5df22c6f772b99a75edd074b6c18ec12d222
parent0a11c77c44d4d0924d170958d88b5998634d4697
net/mlx5: Added missing check of msg length in verifying its signature

Set and verify signature calculates the signature for each of the
mailbox nodes, even for those that are unused (from cache). Added
a missing length check to set and verify only those which are used.

While here, also moved the setting of msg's nodes token to where we
already go over them. This saves a pass because checksum is disabled,
and the only useful thing remaining that set signature does is setting
the token.

Fixes: 7c120481afcc ('mlx5: Add driver for Mellanox Connect-IB
adapters')
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c