mirror of https://gitee.com/openkylin/linux.git
octeontx2-af: Copy the right amount of memory
This is a copy and paste bug where we copied the sizeof() from the chunk
before. We're copying more data than intended but the destination is a
union so it doesn't cause memory corruption.
Fixes: ffb0abd7e9
("octeontx2-af: NIX AQ instruction enqueue support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
db4f1be3ca
commit
cdaa18f9bd
|
@ -573,7 +573,7 @@ static int rvu_nix_aq_enq_inst(struct rvu *rvu, struct nix_aq_enq_req *req,
|
|||
sizeof(struct nix_cq_ctx_s));
|
||||
else if (req->ctype == NIX_AQ_CTYPE_RSS)
|
||||
memcpy(&rsp->rss, ctx,
|
||||
sizeof(struct nix_cq_ctx_s));
|
||||
sizeof(struct nix_rsse_s));
|
||||
else if (req->ctype == NIX_AQ_CTYPE_MCE)
|
||||
memcpy(&rsp->mce, ctx,
|
||||
sizeof(struct nix_rx_mce_s));
|
||||
|
|
Loading…
Reference in New Issue