Re: [PATCH] HID: Check whether if the hidraw is NULL pointer before release.

From: Jiri Kosina
Date: Fri Feb 05 2016 - 08:33:36 EST


On Tue, 2 Feb 2016, shenpengru@xxxxxxxxx wrote:

> From: shenpengru <shenpengru@xxxxxxxxxx>
>
> The logic of service which operate hidraw device in user-space may
> not correct, sometimes it may release hidraw dev for more than once.
> In order to prevent this situation, we need to make the driver more
> robust.

Hmm .. how would you call close(fd) twice on the same descriptor and let
it pass fput()?

I'd like to better understand how we ended up in this situation. Could you
please provide more details?

Thanks a lot,

--
Jiri Kosina
SUSE Labs