Re: [patch] input: pcf8574_keypad: use after input_unregister_device()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 11, 2010 at 10:28:30AM +0300, Dan Carpenter wrote:
> input_unregister_device() is tricky because it frees the argument.  So
> in the original code the call to input_set_drvdata(idev, NULL) is a use
> after free bug.  The other problem is the input_set_drvdata() makes the 
> input_free_device() into a no-op.
> 
> The prefered style in input/ is to make input_register_device() the
> last function in the probe which can fail.  That way we don't need to
> call input_unregister_device().
> 
> Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>

Applied, thanks Dan.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux