Re: [PATCH][next] RDMA/bnxt_re: fix or'ing of data into an uninitialized struct member

From: Jason Gunthorpe
Date: Mon Feb 11 2019 - 17:35:32 EST


On Mon, Feb 11, 2019 at 01:34:15PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> The struct member comp_mask has not been initialized however a bit
> pattern is being bitwise or'd into the member and hence other bit
> fields in comp_mask may contain any garbage from the stack. Fix this
> by making the bitwise or into an assignment.
>
> Fixes: 95b86d1c91ad ("RDMA/bnxt_re: Update kernel user abi to pass chip context")
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> Acked-By: Devesh Sharma <devesh.sharma@xxxxxxxxxxxx>
> ---
> drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next thanks

Jason