This is a note to let you know that I've just added the patch titled fs/ntfs3: Fix possible NULL-ptr-deref in ni_readpage_cmpr() to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: fs-ntfs3-fix-possible-null-ptr-deref-in-ni_readpage_.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 0fd10ddae05594b565fd05c60f8d112d42ce6ed1 Author: Konstantin Komarov <almaz.alexandrovich@xxxxxxxxxxxxxxxxxxxx> Date: Tue Sep 26 11:19:08 2023 +0300 fs/ntfs3: Fix possible NULL-ptr-deref in ni_readpage_cmpr() [ Upstream commit 32e9212256b88f35466642f9c939bb40cfb2c2de ] Signed-off-by: Konstantin Komarov <almaz.alexandrovich@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index 166c3c49530ec..bb7e33c240737 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -2149,7 +2149,7 @@ int ni_readpage_cmpr(struct ntfs_inode *ni, struct page *page) for (i = 0; i < pages_per_frame; i++) { pg = pages[i]; - if (i == idx) + if (i == idx || !pg) continue; unlock_page(pg); put_page(pg);