Whamcloud - gitweb
EX-7812 llite: use CIT_MISC in check_compression
authorPatrick Farrell <pfarrell@whamcloud.com>
Mon, 3 Jul 2023 23:57:17 +0000 (19:57 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 6 Jul 2023 04:11:13 +0000 (04:11 +0000)
commit7b8aa61f49c3d6f871337718c136b1466985ed0b
treebbc1b338f9e582b997dac43b4d30ce3e3cc23749
parent7aed194858f6738815c53b987110e37e44c9c7b5
EX-7812 llite: use CIT_MISC in check_compression

ll_mmap_check_compression uses a CIT_FAULT io type and
initializes it with cl_io_rw_init.  This doesn't
initialize the IO correctly and this sometimes results
in the following crash during io_fini, because the ft_page
pointer is initialized to something else by cl_io_rw_init:

[ 1512.276302] BUG: unable to handle kernel NULL pointer dereference at 000000000000004a
[ 1512.280778] RIP: 0010:cl_pagevec_put+0x9f/0x3a0 [obdclass]
[ 1512.288693]  vvp_io_fault_fini+0x21/0x40 [lustre]
[ 1512.289294]  cl_io_fini+0x7a/0x230 [obdclass]
[ 1512.289876]  ll_mmap_check_compression+0x403/0x540 [lustre]

Fixes: 95df962a92 ("EX-6265 llite: disable mmap on compressed files"

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ib1f270f071370d6c045bb9d799ab5b7b41a6c6be
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51553
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/llite_mmap.c
lustre/obdclass/cl_io.c