driver: uio: fix possible use-after-free in __uio_register_device
In uio_dev_add_attributes() error handing case, idev is used after device_unregister(), in which 'idev' has been released, touch idev cause use-after-free. Fixes: a93e7b33 ("uio: Prevent device destruction while fds are open") Signed-off-by: NLiu Jian <liujian56@huawei.com> Reviewed-by: NHamish Martin <hamish.martin@alliedtelesis.co.nz> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录