]> 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>
Thu, 1 Sep 2022 14:29:50 +0000 (16:29 +0200)
commit11ddd1511dc452e4ad133831b213b19c6914a6c8
tree1b3ba0de530f21d85e58ea49d308ec5048948a76
parent8f854b4d8770685be9e0ff6c9b2988874dd4d982
misc: ocxl: fix possible refcount leak in afu_ioctl()

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

Fixes: d2d4c97abd8d ("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>
drivers/misc/ocxl/file.c