Input: Add check for grabbed device before flushing the device
Subsystems (2)
PATCH 1/1 Input: Add check for grabbed device before flushing the device
From: Anshul Garg <[email protected]>
If input device is grabbed then client which grabbed the device should only flush the device and for other clients error should be returned.
Signed-off-by Anshul Garg <[email protected]>
--- drivers/input/evdev.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/input/evdev.c +2 -0
@@ -248,6 +248,8 @@ static int evdev_flush(struct file *file, fl_owner_t id)if (!evdev->exist || client->revoked) retval = -ENODEV ; +else if (evdev->grab != client) + retval = -EINVAL ;else retval =input_flush_device (&evdev->handle, file);
Signature · 1 line
1.7.9.5