diff options
author | Xi Wang <[email protected]> | 2012-04-20 15:49:44 -0500 |
---|---|---|
committer | Alex Elder <[email protected]> | 2012-05-14 12:12:41 -0500 |
commit | 50f7c4c967d0b5acd8e7ba6ab654dc4a7ac869ac (patch) | |
tree | a37aa5a2aad9e434bf6b77e0b65601b6e30589b2 /tools/perf/scripts/python/net_dropmonitor.py | |
parent | f8ad495a8a0277b88c59bf38319e5e944aaf5a4a (diff) |
rbd: fix integer overflow in rbd_header_from_disk()
ondisk->snap_count is read from disk via rbd_req_sync_read() and thus
needs validation. Otherwise, a bogus `snap_count' could overflow the
kmalloc() size, leading to memory corruption.
Also use `u32' consistently for `snap_count'.
[[email protected]: changed to use UINT_MAX rather than ULONG_MAX]
Signed-off-by: Xi Wang <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions