* [Qemu-devel] [PATCH] e1000e: fix incorrect access to pointer
@ 2016-07-15 8:44 Paolo Bonzini
2016-07-18 5:59 ` Jason Wang
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2016-07-15 8:44 UTC (permalink / raw)
To: qemu-devel; +Cc: jasowang
This is not dereferencing the pointer, and instead checking only
the value of the pointer.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/net/e1000e_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c
index 6050d8b..badb1fe 100644
--- a/hw/net/e1000e_core.c
+++ b/hw/net/e1000e_core.c
@@ -281,7 +281,7 @@ e1000e_intrmgr_delay_rx_causes(E1000ECore *core, uint32_t *causes)
/* Check if delayed RX interrupts disabled by client
or if there are causes that cannot be delayed */
- if ((rdtr == 0) || (causes != 0)) {
+ if ((rdtr == 0) || (*causes != 0)) {
return false;
}
@@ -322,7 +322,7 @@ e1000e_intrmgr_delay_tx_causes(E1000ECore *core, uint32_t *causes)
*causes &= ~delayable_causes;
/* If there are causes that cannot be delayed */
- if (causes != 0) {
+ if (*causes != 0) {
return false;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] e1000e: fix incorrect access to pointer
2016-07-15 8:44 [Qemu-devel] [PATCH] e1000e: fix incorrect access to pointer Paolo Bonzini
@ 2016-07-18 5:59 ` Jason Wang
0 siblings, 0 replies; 2+ messages in thread
From: Jason Wang @ 2016-07-18 5:59 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel
On 2016年07月15日 16:44, Paolo Bonzini wrote:
> This is not dereferencing the pointer, and instead checking only
> the value of the pointer.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/net/e1000e_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c
> index 6050d8b..badb1fe 100644
> --- a/hw/net/e1000e_core.c
> +++ b/hw/net/e1000e_core.c
> @@ -281,7 +281,7 @@ e1000e_intrmgr_delay_rx_causes(E1000ECore *core, uint32_t *causes)
>
> /* Check if delayed RX interrupts disabled by client
> or if there are causes that cannot be delayed */
> - if ((rdtr == 0) || (causes != 0)) {
> + if ((rdtr == 0) || (*causes != 0)) {
> return false;
> }
>
> @@ -322,7 +322,7 @@ e1000e_intrmgr_delay_tx_causes(E1000ECore *core, uint32_t *causes)
> *causes &= ~delayable_causes;
>
> /* If there are causes that cannot be delayed */
> - if (causes != 0) {
> + if (*causes != 0) {
> return false;
> }
>
Applied to -net. Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-18 5:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-15 8:44 [Qemu-devel] [PATCH] e1000e: fix incorrect access to pointer Paolo Bonzini
2016-07-18 5:59 ` Jason Wang
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.