* [PATCH net] fjes: fix off-by-one error at fjes_hw_update_zone_task()
@ 2015-09-17 14:21 Taku Izumi
2015-09-18 5:34 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Taku Izumi @ 2015-09-17 14:21 UTC (permalink / raw)
To: netdev, davem; +Cc: dan.carpenter, Taku Izumi
Dan Carpenter reported off-by-one error of fjes at
http://www.mail-archive.com/netdev@vger.kernel.org/msg77520.html
Actually this is a bug.
ep_shm_info[epidx].{es_status, zone} should be update
inside for loop.
This patch fixes this bug.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
drivers/net/fjes/fjes_hw.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/fjes/fjes_hw.c b/drivers/net/fjes/fjes_hw.c
index b5f4a78..2d3848c 100644
--- a/drivers/net/fjes/fjes_hw.c
+++ b/drivers/net/fjes/fjes_hw.c
@@ -1011,11 +1011,11 @@ static void fjes_hw_update_zone_task(struct work_struct *work)
set_bit(epidx, &irq_bit);
break;
}
- }
-
- hw->ep_shm_info[epidx].es_status = info[epidx].es_status;
- hw->ep_shm_info[epidx].zone = info[epidx].zone;
+ hw->ep_shm_info[epidx].es_status =
+ info[epidx].es_status;
+ hw->ep_shm_info[epidx].zone = info[epidx].zone;
+ }
break;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] fjes: fix off-by-one error at fjes_hw_update_zone_task()
2015-09-17 14:21 [PATCH net] fjes: fix off-by-one error at fjes_hw_update_zone_task() Taku Izumi
@ 2015-09-18 5:34 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-09-18 5:34 UTC (permalink / raw)
To: izumi.taku; +Cc: netdev, dan.carpenter
From: Taku Izumi <izumi.taku@jp.fujitsu.com>
Date: Thu, 17 Sep 2015 23:21:21 +0900
> Dan Carpenter reported off-by-one error of fjes at
> http://www.mail-archive.com/netdev@vger.kernel.org/msg77520.html
>
> Actually this is a bug.
> ep_shm_info[epidx].{es_status, zone} should be update
> inside for loop.
>
> This patch fixes this bug.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-18 5:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-17 14:21 [PATCH net] fjes: fix off-by-one error at fjes_hw_update_zone_task() Taku Izumi
2015-09-18 5:34 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).