]> git.baikalelectronics.ru Git - kernel.git/commit
usb: cdc-acm: make sure a refcount is taken early enough
authorOliver Neukum <oneukum@suse.com>
Thu, 8 Aug 2019 14:21:19 +0000 (16:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Aug 2019 12:49:16 +0000 (14:49 +0200)
commitf2c8891b2c29ebc2b934de0d4ce52f1ee11a04d9
tree136da6da0627fede8a7afd52da66423eca351d48
parent5ae2bc4e6cf8fdcb04c26e806194ac11e8cc2cda
usb: cdc-acm: make sure a refcount is taken early enough

destroy() will decrement the refcount on the interface, so that
it needs to be taken so early that it never undercounts.

Fixes: df05fe2bcffc3 ("USB: cdc-acm: Fix potential deadlock (lockdep warning)")
Cc: stable <stable@vger.kernel.org>
Reported-and-tested-by: syzbot+1b2449b7b5dc240d107a@syzkaller.appspotmail.com
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Link: https://lore.kernel.org/r/20190808142119.7998-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-acm.c