summaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev.c
diff options
context:
space:
mode:
authorTony Hutter <[email protected]>2016-08-01 17:32:18 -0700
committerBrian Behlendorf <[email protected]>2016-08-02 08:45:24 -0700
commit4eb0db42d30b2ea8bed018f2227ebafd3ce35c9c (patch)
treec96c8a2976c9fbb27be0b07b7b8ee7334c3c4768 /module/zfs/vdev.c
parente24e62a948e1519fb4c1bfc40d9d51e36fbbe63e (diff)
Fix possible VDEV stats array overflow
Fix a possible VDEV statistics array overflow when ZIOs with ZIO_PRIORITY_NOW complete. Signed-off-by: Tony Hutter <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #4883 Closes #4917
Diffstat (limited to 'module/zfs/vdev.c')
-rw-r--r--module/zfs/vdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c
index 302458b73..0178bfdec 100644
--- a/module/zfs/vdev.c
+++ b/module/zfs/vdev.c
@@ -2982,7 +2982,8 @@ vdev_stat_update(zio_t *zio, uint64_t psize)
* The bytes/ops/histograms are recorded at the leaf level and
* aggregated into the higher level vdevs in vdev_get_stats().
*/
- if (vd->vdev_ops->vdev_op_leaf) {
+ if (vd->vdev_ops->vdev_op_leaf &&
+ (zio->io_priority < ZIO_PRIORITY_NUM_QUEUEABLE)) {
vs->vs_ops[type]++;
vs->vs_bytes[type] += psize;