From: Christoph Hellwig Date: Fri, 12 Jul 2019 03:55:17 +0000 (-0700) Subject: mm/filemap.c: fix an overly long line in read_cache_page X-Git-Tag: platform-drivers-x86-v5.3-2~55^2~88 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d322a8e5e3e9742fa6b76a207e5df57e03f318f9;p=linux-platform-drivers-x86.git mm/filemap.c: fix an overly long line in read_cache_page Patch series "fix filler_t callback type mismatches", v2. Casting mapping->a_ops->readpage to filler_t causes an indirect call type mismatch with Control-Flow Integrity checking. This change fixes the mismatch in read_cache_page_gfp and read_mapping_page by adding using a NULL filler argument as an indication to call ->readpage directly, and by passing the right parameter callbacks in nfs and jffs2. This patch (of 4): Code cleanup. Link: http://lkml.kernel.org/r/20190520055731.24538-2-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook Cc: Nick Desaulniers Cc: Sami Tolvanen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/filemap.c b/mm/filemap.c index f1aa20ab8434..d6f7596f148f 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2915,7 +2915,8 @@ struct page *read_cache_page(struct address_space *mapping, int (*filler)(void *, struct page *), void *data) { - return do_read_cache_page(mapping, index, filler, data, mapping_gfp_mask(mapping)); + return do_read_cache_page(mapping, index, filler, data, + mapping_gfp_mask(mapping)); } EXPORT_SYMBOL(read_cache_page);