]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/efa: Clear the admin command buffer prior to its submission
authorGal Pressman <galpress@amazon.com>
Tue, 12 Nov 2019 09:26:08 +0000 (11:26 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 14 Nov 2019 15:57:33 +0000 (11:57 -0400)
commit99108b2e358fcc1b9729ec73c6f3582911d50a8b
treed5b538562cd163bead00423866fb7eb77c47b152
parente8499441f6cc2a40189b0ffb4ce9cd97a36bd49f
RDMA/efa: Clear the admin command buffer prior to its submission

We cannot rely on the entry memcpy as we only copy the actual size of the
command, the rest of the bytes must be memset to zero.

Currently providing non-zero memory will not have any user visible impact.
However, since admin commands are extendable (in a backwards compatible
way) everything beyond the size of the command must be cleared to prevent
issues in the future.

Fixes: 5377afdbfee5 ("RDMA/efa: Implement functions that submit and complete admin commands")
Link: https://lore.kernel.org/r/20191112092608.46964-1-galpress@amazon.com
Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com>
Reviewed-by: Firas JahJah <firasj@amazon.com>
Signed-off-by: Gal Pressman <galpress@amazon.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/efa/efa_com.c