[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130115224324.875621848@linuxfoundation.org>
Date: Tue, 15 Jan 2013 14:45:25 -0800
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
alan@...rguk.ukuu.org.uk, Sage Weil <sage@...tank.com>,
Alex Elder <elder@...tank.com>
Subject: [ 160/171] rbd: BUG on invalid layout
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sage Weil <sage@...tank.com>
This shouldn't actually be possible because the layout struct is
constructed from the RBD header and validated then.
[elder@...tank.com: converted BUG() call to equivalent rbd_assert()]
Signed-off-by: Sage Weil <sage@...tank.com>
Reviewed-by: Alex Elder <elder@...tank.com>
(based on commit 6cae3717cddaf8e5e96e304733dca66e40d56f89)
---
drivers/block/rbd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -930,8 +930,9 @@ static int rbd_do_request(struct request
layout->fl_object_size = cpu_to_le32(1 << RBD_MAX_OBJ_ORDER);
layout->fl_pg_preferred = cpu_to_le32(-1);
layout->fl_pg_pool = cpu_to_le32(dev->poolid);
- ceph_calc_raw_layout(osdc, layout, snapid, ofs, &len, &bno,
- req, ops);
+ ret = ceph_calc_raw_layout(osdc, layout, snapid, ofs, &len, &bno,
+ req, ops);
+ BUG_ON(ret != 0);
ceph_osdc_build_request(req, ofs, &len,
ops,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists