Skip to content
Commit 6becfe91 authored by Colin Ian King's avatar Colin Ian King Committed by Jason Gunthorpe
Browse files

RDMA/bnxt_re: Fix uninitialized struct bit field rsvd1

The bit field rsvd1 in resp is not being initialized and garbage data is
being copied from the stack back to userspace via the ib_copy_to_udata
call. Fix this by setting the entire struct resp to zero; this will ensure
that further new bit fields in the future will be zero'd too.

Link: https://lore.kernel.org/r/20210623182437.163801-1-colin.king@canonical.com
Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: 87974051

 ("RDMA/bnxt_re: Update ABI to pass wqe-mode to user space")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
[jgg: remove extra zeroing]
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 109d19a5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment