diff options
author | Taku Izumi <izumi.taku@jp.fujitsu.com> | 2015-09-17 10:21:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-18 01:34:09 -0400 |
commit | adb094e5e7285385770eb7a7c122bfc663c5e174 (patch) | |
tree | 770e0bbdda45f07c81edcc5bebf284ab903db0d4 | |
parent | 6cf35642147103195f126d13bdc1d4c32c7c6666 (diff) |
fjes: fix off-by-one error at fjes_hw_update_zone_task()
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/fjes/fjes_hw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/fjes/fjes_hw.c b/drivers/net/fjes/fjes_hw.c index b5f4a78da828..2d3848c9dc35 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) | |||
1011 | set_bit(epidx, &irq_bit); | 1011 | set_bit(epidx, &irq_bit); |
1012 | break; | 1012 | break; |
1013 | } | 1013 | } |
1014 | } | ||
1015 | |||
1016 | hw->ep_shm_info[epidx].es_status = info[epidx].es_status; | ||
1017 | hw->ep_shm_info[epidx].zone = info[epidx].zone; | ||
1018 | 1014 | ||
1015 | hw->ep_shm_info[epidx].es_status = | ||
1016 | info[epidx].es_status; | ||
1017 | hw->ep_shm_info[epidx].zone = info[epidx].zone; | ||
1018 | } | ||
1019 | break; | 1019 | break; |
1020 | } | 1020 | } |
1021 | 1021 | ||