hulk inclusion category: bugfix bugzilla: https://atomgit.com/src-openeuler/kernel/issues/14195 CVE: CVE-2026-31453 -------------------------------- This reverts commit 50fab7212286ddeec34a3d4c4050d4f22637312b. The Linux mainline fix solution is adopted, so revert the current patch. Fixes: 50fab7212286 ("xfs: fix a UAF when inode item push") Signed-off-by: Long Li <leo.lilong@huawei.com> --- fs/xfs/xfs_inode_item.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index 455d27b158cf..950de5200656 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c @@ -747,14 +747,9 @@ xfs_inode_item_push( if (xfs_iflags_test(ip, XFS_IFLUSHING)) return XFS_ITEM_FLUSHING; - if (!xfs_ilock_nowait(ip, XFS_ILOCK_SHARED)) + if (!xfs_buf_trylock(bp)) return XFS_ITEM_LOCKED; - if (!xfs_buf_trylock(bp)) { - xfs_iunlock(ip, XFS_ILOCK_SHARED); - return XFS_ITEM_LOCKED; - } - spin_unlock(&lip->li_ailp->ail_lock); /* @@ -780,7 +775,6 @@ xfs_inode_item_push( } spin_lock(&lip->li_ailp->ail_lock); - xfs_iunlock(ip, XFS_ILOCK_SHARED); return rval; } -- 2.52.0