android_kernel_samsung_msm8976/fs/ceph
Alex Elder 3489b42a72 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>
2012-03-22 10:47:52 -05:00
..
addr.c ceph: use i_ceph_lock instead of i_lock 2011-12-07 10:46:44 -08:00
caps.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2012-02-02 15:47:33 -08:00
ceph_frag.c
debugfs.c ceph: explicitly reference rename old_dentry parent dir in request 2011-07-26 11:31:14 -07:00
dir.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2012-02-02 15:47:33 -08:00
export.c ceph: avoid useless dget/dput in encode_fh 2012-01-10 08:57:00 -08:00
file.c ceph: fix SEEK_CUR, SEEK_SET regression 2011-12-13 09:19:26 -08:00
inode.c ceph: avoid panic with mismatched symlink sizes in fill_inode() 2012-03-22 10:47:45 -05:00
ioctl.c ceph: use i_ceph_lock instead of i_lock 2011-12-07 10:46:44 -08:00
ioctl.h ceph: document ioctls 2011-10-25 16:10:15 -07:00
Kconfig
locks.c ceph: unwind canceled flock state 2011-06-07 21:36:45 -07:00
Makefile
mds_client.c ceph: don't reset s_cap_ttl to zero 2012-03-22 10:47:45 -05:00
mds_client.h ceph: create a new session lock to avoid lock inversion 2012-02-02 12:49:19 -08:00
mdsmap.c
snap.c ceph: fix overflow check in build_snap_context() 2012-03-22 10:47:45 -05:00
strings.c
super.c ceph: ensure Boolean options support both senses 2012-03-22 10:47:51 -05:00
super.h ceph: avoid repeatedly computing the size of constant vxattr names 2012-03-22 10:47:46 -05:00
xattr.c ceph: fix three bugs, two in ceph_vxattrcb_file_layout() 2012-03-22 10:47:52 -05:00