]> 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)
commit8f14554cd976ce90fc282386db1d86fa9ccdd118
tree282b5df22c6f772b99a75edd074b6c18ec12d222
parent3610d767a4216e1d9520aa527208c41423206742
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: ffaf2c1a3989 ('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