diff --git a/mm/mmap.c b/mm/mmap.c index e4a8f67aad625b44fd4b4f723b57b865fb05c4fd..f1e8c7f93e04c61f825dbb22b2a8e3e25370f031 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1358,6 +1358,9 @@ static inline u64 file_mmap_size_max(struct file *file, struct inode *inode) if (S_ISBLK(inode->i_mode)) return MAX_LFS_FILESIZE; + if (S_ISSOCK(inode->i_mode)) + return MAX_LFS_FILESIZE; + /* Special "we do even unsigned file positions" case */ if (file->f_mode & FMODE_UNSIGNED_OFFSET) return 0;