summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2025-01-16 07:01:41 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-08 09:58:13 +0100
commitb0773cf34eec136d84f94d20ededa1b3e55a157e (patch)
tree25a6a563d50db512eb36e38f11331f9fc6473700 /sound
parent0a8a05bf2873fb726bbe38f630730872f40eb8de (diff)
downloadlinux-b0773cf34eec136d84f94d20ededa1b3e55a157e.tar.gz
linux-b0773cf34eec136d84f94d20ededa1b3e55a157e.tar.bz2
linux-b0773cf34eec136d84f94d20ededa1b3e55a157e.zip
xfs: check for dead buffers in xfs_buf_find_insert
commit 07eae0fa67ca4bbb199ad85645e0f9dfaef931cd upstream. Commit 32dd4f9c506b ("xfs: remove a superflous hash lookup when inserting new buffers") converted xfs_buf_find_insert to use rhashtable_lookup_get_insert_fast and thus an operation that returns the existing buffer when an insert would duplicate the hash key. But this code path misses the check for a buffer with a reference count of zero, which could lead to reusing an about to be freed buffer. Fix this by using the same atomic_inc_not_zero pattern as xfs_buf_insert. Fixes: 32dd4f9c506b ("xfs: remove a superflous hash lookup when inserting new buffers") Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Cc: stable@vger.kernel.org # v6.0 Signed-off-by: Carlos Maiolino <cem@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions