Files
linux/fs/cifs
Ronnie Sahlberg bc32d90e4d cifs: fix return value for cifs_listxattr
[ Upstream commit 0c5d6cb664 ]

If the application buffer was too small to fit all the names
we would still count the number of bytes and return this for
listxattr. This would then trigger a BUG in usercopy.c

Fix the computation of the size so that we return -ERANGE
correctly when the buffer is too small.

This fixes the kernel BUG for xfstest generic/377

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-11-27 16:10:46 +01:00
..
2016-10-13 19:48:11 -05:00
2017-09-17 23:10:48 -05:00
2018-04-24 09:36:27 +02:00
2018-09-05 09:26:33 +02:00
2018-04-24 09:36:27 +02:00
2012-07-24 10:25:13 -05:00
2013-09-08 14:54:24 -05:00