]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: gasket: interrupt: fix the missed eventfd_ctx_put() in gasket_interrupt.c
authorJing Xiangfeng <jingxiangfeng@huawei.com>
Thu, 12 Nov 2020 06:49:24 +0000 (14:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:25:53 +0000 (11:25 +0100)
commitd5f225ccabb49141dc0030a43b002d78a93045b5
tree40c41e231945467877d6fedfdfdcf098bca48c7b
parent7c54e646390e424e07df1a33f8d8b9dc4b721d8a
staging: gasket: interrupt: fix the missed eventfd_ctx_put() in gasket_interrupt.c

[ Upstream commit ab5b769a23af12a675b9f3d7dd529250c527f5ac ]

gasket_interrupt_set_eventfd() misses to call eventfd_ctx_put() in an
error path. We check interrupt is valid before calling
eventfd_ctx_fdget() to fix it.

There is the same issue in gasket_interrupt_clear_eventfd(), Add the
missed function call to fix it.

Fixes: 9a69f5087ccc ("drivers/staging: Gasket driver framework + Apex driver")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Link: https://lore.kernel.org/r/20201112064924.99680-1-jingxiangfeng@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/gasket/gasket_interrupt.c