]> git.baikalelectronics.ru Git - kernel.git/commit
misc: ocxl: fix possible refcount leak in afu_ioctl()
authorHangyu Hua <hbh25y@gmail.com>
Wed, 24 Aug 2022 08:26:00 +0000 (16:26 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:37 +0000 (13:22 +0200)
commitb47e023ddba3e55bfc640793e01d15c8b67b2ea0
tree5b0faefd218a2cec5b7c703fe383f5edaaee5f55
parent10cc06f2cc0893caf372b945f0ded58620829dea
misc: ocxl: fix possible refcount leak in afu_ioctl()

[ Upstream commit 7c326e8c7e611464e2dd295a079fe508d2b9d65f ]

eventfd_ctx_put need to be called to put the refcount that gotten by
eventfd_ctx_fdget when ocxl_irq_set_handler fails.

Fixes: a7eeec05023a ("ocxl: move event_fd handling to frontend")
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Link: https://lore.kernel.org/r/20220824082600.36159-1-hbh25y@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/ocxl/file.c