Miklos Szeredi cbc5b45148 fuse: verify attributes
commit eb59bd17d2fa6e5e84fba61a5ebdea984222e6d5 upstream.

If a filesystem returns negative inode sizes, future reads on the file were
causing the cpu to spin on truncate_pagecache.

Create a helper to validate the attributes.  This now does two things:

 - check the file mode
 - check if the file size fits in i_size without overflowing

Reported-by: Arijit Banerjee <arijit@rubrik.com>
Fixes: d8a5ba45457e ("[PATCH] FUSE - core")
Cc: <stable@vger.kernel.org> # v2.6.14
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-13 08:42:31 +01:00
..
2019-09-24 15:28:01 +02:00
2019-12-13 08:42:31 +01:00
2019-12-13 08:42:31 +01:00
2019-12-13 08:42:31 +01:00
2019-10-15 16:11:41 +02:00
2019-09-18 20:17:50 +02:00
2019-12-13 08:42:31 +01:00