提交 781159fb 编写于 作者: D Dan Carpenter 提交者: David S. Miller

liquidio: clear the correct memory

There is a cut and paste bug here so we accidentally clear the first
few bytes of "resp" a second time instead clearing "ctx".

Fixes: 50c0add5 ("liquidio: refactor interrupt moderation code")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NFelix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 03cf65a9
......@@ -1359,7 +1359,7 @@ static int octnet_get_intrmod_cfg(struct lio *lio,
memset(resp, 0, sizeof(struct oct_intrmod_resp));
ctx = (struct oct_intrmod_context *)sc->ctxptr;
memset(resp, 0, sizeof(struct oct_intrmod_context));
memset(ctx, 0, sizeof(struct oct_intrmod_context));
WRITE_ONCE(ctx->cond, 0);
ctx->octeon_id = lio_get_device_id(oct_dev);
init_waitqueue_head(&ctx->wc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册