mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
USB: misc: uss720: Fix leak in get_1284_register
if wait_for_completion_timeout() times out in get_1284_register() then we do not destroy the reference acquired via kref_get() in submit_async_request. Add the missing kref_put in the timeout path. link: https://syzkaller.appspot.com/bug?extid=56962eb32ba0136cd330 Reported-by: syzbot+56962eb32ba0136cd330@syzkaller.appspotmail.com Signed-off-by: Michail Tatas <michail.tatas@gmail.com> Link: https://patch.msgid.link/allaDTUua9n5DQ0a@michalis-linux Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
590d74ec8f
commit
15902712b9
|
|
@ -223,6 +223,7 @@ static int get_1284_register(struct parport *pp, unsigned char reg, unsigned cha
|
|||
}
|
||||
printk(KERN_WARNING "get_1284_register timeout\n");
|
||||
kill_all_async_requests_priv(priv);
|
||||
kref_put(&rq->ref_count, destroy_async);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user