* [PATCH -next] liquidio: clear the correct memory
@ 2017-04-03 18:18 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2017-04-03 18:18 UTC (permalink / raw)
To: Derek Chickles, Prasad Kanneganti
Cc: Satanand Burla, Felix Manlunas, Raghu Vatsavayi, netdev, kernel-janitors
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: 50c0add534d2 ("liquidio: refactor interrupt moderation code")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
index fac02ed2c449..dab10c7e4443 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
@@ -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);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH -next] liquidio: clear the correct memory
@ 2017-04-03 18:18 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2017-04-03 18:18 UTC (permalink / raw)
To: Derek Chickles, Prasad Kanneganti
Cc: Satanand Burla, Felix Manlunas, Raghu Vatsavayi, netdev, kernel-janitors
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: 50c0add534d2 ("liquidio: refactor interrupt moderation code")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
index fac02ed2c449..dab10c7e4443 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
@@ -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);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH -next] liquidio: clear the correct memory
2017-04-03 18:18 ` Dan Carpenter
@ 2017-04-03 18:40 ` Felix Manlunas
-1 siblings, 0 replies; 6+ messages in thread
From: Felix Manlunas @ 2017-04-03 18:40 UTC (permalink / raw)
To: Dan Carpenter
Cc: Derek Chickles, Prasad Kanneganti, Satanand Burla,
Raghu Vatsavayi, netdev, kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon, 2017-Apr-03 21:18:27 +0300
> 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: 50c0add534d2 ("liquidio: refactor interrupt moderation code")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
> index fac02ed2c449..dab10c7e4443 100644
> --- a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
> +++ b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
> @@ -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);
Good catch, Dan. Thanks.
Acked-by: Felix Manlunas <felix.manlunas@cavium.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] liquidio: clear the correct memory
@ 2017-04-03 18:40 ` Felix Manlunas
0 siblings, 0 replies; 6+ messages in thread
From: Felix Manlunas @ 2017-04-03 18:40 UTC (permalink / raw)
To: Dan Carpenter
Cc: Derek Chickles, Prasad Kanneganti, Satanand Burla,
Raghu Vatsavayi, netdev, kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon, 2017-Apr-03 21:18:27 +0300
> 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: 50c0add534d2 ("liquidio: refactor interrupt moderation code")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
> index fac02ed2c449..dab10c7e4443 100644
> --- a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
> +++ b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
> @@ -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);
Good catch, Dan. Thanks.
Acked-by: Felix Manlunas <felix.manlunas@cavium.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] liquidio: clear the correct memory
2017-04-03 18:18 ` Dan Carpenter
@ 2017-04-05 13:54 ` David Miller
-1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2017-04-05 13:54 UTC (permalink / raw)
To: dan.carpenter
Cc: derek.chickles, prasad.kanneganti, satananda.burla,
felix.manlunas, raghu.vatsavayi, netdev, kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon, 3 Apr 2017 21:18:27 +0300
> 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: 50c0add534d2 ("liquidio: refactor interrupt moderation code")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] liquidio: clear the correct memory
@ 2017-04-05 13:54 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2017-04-05 13:54 UTC (permalink / raw)
To: dan.carpenter
Cc: derek.chickles, prasad.kanneganti, satananda.burla,
felix.manlunas, raghu.vatsavayi, netdev, kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon, 3 Apr 2017 21:18:27 +0300
> 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: 50c0add534d2 ("liquidio: refactor interrupt moderation code")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-04-05 13:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-03 18:18 [PATCH -next] liquidio: clear the correct memory Dan Carpenter
2017-04-03 18:18 ` Dan Carpenter
2017-04-03 18:40 ` Felix Manlunas
2017-04-03 18:40 ` Felix Manlunas
2017-04-05 13:54 ` David Miller
2017-04-05 13:54 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.