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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Sep 2018 18:04:34 +0000 (20:04 +0200)
commitf5fa2009e3a9159e99fe6b11d51796008883cdf5
treebd6c49e6c2fdd59a250630f2c799a3affc306586
parentbd3a83160c0d9ef4c0901ebd14ed77bdab93df2e
pnfs/blocklayout: off by one in bl_map_stripe()

commit 0914bb965e38a055e9245637aed117efbe976e91 upstream.

"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: 5c83746a0cf2 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/blocklayout/dev.c