aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlex Elder <elder@dreamhost.com>2012-03-08 16:50:09 -0600
committerAlex Elder <elder@dreamhost.com>2012-03-22 10:47:52 -0500
commit3489b42a72a41d477665ab37f196ae9257180abb (patch)
treef90c349a10cb7ca6c1c2da5d141324c636817d33 /net
parentlibceph: isolate kmap() call in write_partial_msg_pages() (diff)
downloadlinux-dev-3489b42a72a41d477665ab37f196ae9257180abb.tar.xz
linux-dev-3489b42a72a41d477665ab37f196ae9257180abb.zip
ceph: fix three bugs, two in ceph_vxattrcb_file_layout()
In ceph_vxattrcb_file_layout(), there is a check to determine whether a preferred PG should be formatted into the output buffer. That check assumes that a preferred PG number of 0 indicates "no preference," but that is wrong. No preference is indicated by a negative (specifically, -1) PG number. In addition, if that condition yields true, the preferred value is formatted into a sized buffer, but the size consumed by the earlier snprintf() call is not accounted for, opening up the possibilty of a buffer overrun. Finally, in ceph_vxattrcb_dir_rctime() where the nanoseconds part of the time displayed did not include leading 0's, which led to erroneous (sub-second portion of) time values being shown. This fixes these three issues: http://tracker.newdream.net/issues/2155 http://tracker.newdream.net/issues/2156 http://tracker.newdream.net/issues/2157 Signed-off-by: Alex Elder <elder@dreamhost.com> Reviewed-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions