]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spufs: fix a leak in spufs_create_context()
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 12 Mar 2025 23:38:28 +0000 (19:38 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:32 +0000 (14:39 +0200)
commitd04600f43569d48262e1328eaa1592fcefa2c19c
tree6cb6d516b6f1cf8e8fdbf9be02c26998635c6c0b
parent029d8c711f5e5fe8cf63e8a4a1a140a06e224e45
spufs: fix a leak in spufs_create_context()

[ Upstream commit 0f5cce3fc55b08ee4da3372baccf4bcd36a98396 ]

Leak fixes back in 2008 missed one case - if we are trying to set affinity
and spufs_mkdir() fails, we need to drop the reference to neighbor.

Fixes: 58119068cb27 "[POWERPC] spufs: Fix memory leak on SPU affinity"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/cell/spufs/inode.c