]> git.baikalelectronics.ru Git - kernel.git/commit
pnfs/blocklayout: off by one in bl_map_stripe()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Jul 2018 09:59:58 +0000 (12:59 +0300)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 30 Jul 2018 17:19:40 +0000 (13:19 -0400)
commitd6ce8c606b1b8f1a4b2e897cdc05eee6acf7a883
tree8db52786b17aeff3fb8c9393f8c6d412ba32d2f5
parenta4b0d80f2371079fe9f0a40364f15fbcdc443411
pnfs/blocklayout: off by one in bl_map_stripe()

"dev->nr_children" is the number of children which were parsed
successfully in bl_parse_stripe().  It could be all of them and then, in
that case, it is equal to v->stripe.volumes_count.  Either way, the >
should be >= so that we don't go beyond the end of what we're supposed
to.

Fixes: 4c9d64a75baa ("pnfs/blocklayout: in-kernel GETDEVICEINFO XDR parsing")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org # 3.17+
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/blocklayout/dev.c