Files
linux/fs/ceph
Jeff Layton 679ff6a3e4 ceph: return -ERANGE if virtual xattr value didn't fit in buffer
[ Upstream commit 3b421018f4 ]

The getxattr manpage states that we should return ERANGE if the
destination buffer size is too small to hold the value.
ceph_vxattrcb_layout does this internally, but we should be doing
this for all vxattrs.

Fix the only caller of getxattr_cb to check the returned size
against the buffer length and return -ERANGE if it doesn't fit.
Drop the same check in ceph_vxattrcb_layout and just rely on the
caller to handle it.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Acked-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-08-06 18:29:36 +02:00
..
2017-09-07 08:35:40 +02:00
2017-09-07 08:35:40 +02:00
2016-06-01 10:31:50 +02:00
2016-06-24 23:49:03 -04:00
2012-05-16 14:28:27 -05:00
2013-12-31 20:32:01 +02:00
2016-10-03 16:13:49 +02:00
2013-12-31 20:32:01 +02:00
2019-05-02 09:32:01 +02:00
2016-05-26 01:15:31 +02:00
2019-05-02 09:32:01 +02:00