]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: avoid panic with mismatched symlink sizes in fill_inode()
authorXi Wang <xi.wang@gmail.com>
Fri, 3 Feb 2012 14:55:36 +0000 (09:55 -0500)
committerAlex Elder <elder@dreamhost.com>
Thu, 22 Mar 2012 15:47:45 +0000 (10:47 -0500)
commit6cc9ac7dda3359cf8b4f42cc679467e0ad94afa8
tree4a7ea72b1af2201d2bc521afc5e34ed6f6a8ca41
parent9ac8f464fe4786a4a82f47977df91b32925d3752
ceph: avoid panic with mismatched symlink sizes in fill_inode()

Return -EINVAL rather than panic if iinfo->symlink_len and inode->i_size
do not match.

Also use kstrndup rather than kmalloc/memcpy.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Reviewed-by: Alex Elder <elder@dreamhost.com>
fs/ceph/inode.c