From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,stable@vger.kernel.org,phillip@squashfs.org.uk,
guozh23@xiaopeng.com,akpm@linux-foundation.org
Subject: + squashfs-read-symlink-error-before-putting-cache-entry.patch added to mm-nonmm-unstable branch
Date: Sun, 15 Nov 2026 15:01:21 -0800 [thread overview]
Message-ID: <20261115230121.ED35B1F000C4@smtp.kernel.org> (raw)
The patch titled
Subject: squashfs: read symlink error before putting cache entry
has been added to the -mm mm-nonmm-unstable branch. Its filename is
squashfs-read-symlink-error-before-putting-cache-entry.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/squashfs-read-symlink-error-before-putting-cache-entry.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Guo Zihao <guozh23@xiaopeng.com>
Subject: squashfs: read symlink error before putting cache entry
Date: Thu, 29 Oct 2026 15:25:42 +0800
In the read error path of squashfs_symlink_readpage() the entry is
put back before its error value is read:
squashfs_cache_put(entry);
= entry->error;
Once the reference count drops to zero another thread can take the entry
back from the cache for a different block and overwrite entry->error, so
the value read here may be stale. Read the error before dropping the
reference.
Link: https://lore.kernel.org/20261029072542.4131873-1-guozh23@xiaopeng.com
Fixes: 675f02e5e656 ("squashfs: convert squashfs_symlink_read_folio to use folio APIs")
Signed-off-by: Guo Zihao <guozh23@xiaopeng.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Phillip Lougher <phillip@squashfs.org.uk>
Cc: <stable@vger.kernel.org>
fs/squashfs/symlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/squashfs/symlink.c~squashfs-read-symlink-error-before-putting-cache-entry
+++ a/fs/squashfs/symlink.c
@@ -74,8 +74,8 @@ static int squashfs_symlink_read_folio(s
ERROR("Unable to read symlink [%llx:%x]\n",
squashfs_i(inode)->start,
squashfs_i(inode)->offset);
- squashfs_cache_put(entry);
error = entry->error;
+ squashfs_cache_put(entry);
goto out;
}
_
Patches currently in -mm which might be from guozh23@xiaopeng.com are
squashfs-read-symlink-error-before-putting-cache-entry.patch
reply other threads:[~2026-11-15 23:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261115230121.ED35B1F000C4@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=guozh23@xiaopeng.com \
--cc=mm-commits@vger.kernel.org \
--cc=phillip@squashfs.org.uk \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.