mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-12 06:01:58 +00:00
USB: legousbtower: fix deadlock on disconnect
Fix a potential deadlock if disconnect races with open. Since commitd4ead16f50("USB: prevent char device open/deregister race") core holds an rw-semaphore while open is called and when releasing the minor number during deregistration. This can lead to an ABBA deadlock if a driver takes a lock in open which it also holds during deregistration. This effectively reverts commit78663ecc34("USB: disconnect open race in legousbtower") which needlessly introduced this issue after a generic fix for this race had been added to core by commitd4ead16f50("USB: prevent char device open/deregister race"). Fixes:78663ecc34("USB: disconnect open race in legousbtower") Cc: stable <stable@vger.kernel.org> # 2.6.24 Reported-by: syzbot+f9549f5ee8a5416f0b95@syzkaller.appspotmail.com Tested-by: syzbot+f9549f5ee8a5416f0b95@syzkaller.appspotmail.com Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20190919083039.30898-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1d427be4a3
commit
33a7813219
1 changed files with 2 additions and 17 deletions
Loading…
Add table
Add a link
Reference in a new issue