9P: Cast to loff_t before multiplying
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 4 Oct 2020 18:04:22 +0000 (19:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Nov 2020 10:51:50 +0000 (11:51 +0100)
commit29a41f7b632f280e65b844c0c485e1087a7de1f5
tree2e33a9a889db5b87d3c431f0e0ced6bc66b62fa4
parent8ff240c07ed0607f8e28282dbb9ca5ae5e211a22
9P: Cast to loff_t before multiplying

commit f5f7ab168b9a60e12a4b8f2bb6fcc91321dc23c1 upstream.

On 32-bit systems, this multiplication will overflow for files larger
than 4GB.

Link: http://lkml.kernel.org/r/20201004180428.14494-2-willy@infradead.org
Cc: stable@vger.kernel.org
Fixes: fb89b45cdfdc ("9P: introduction of a new cache=mmap model.")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/9p/vfs_file.c