char: xillybus: Don't destroy workqueue from work item running on it
authorEli Billauer <eli.billauer@gmail.com>
Thu, 1 Aug 2024 12:11:26 +0000 (15:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Aug 2024 08:06:12 +0000 (10:06 +0200)
commitccbde4b128ef9c73d14d0d7817d68ef795f6d131
tree5af1b5bf81b12815bedb6dda9dc81e44a578a3c6
parent7c626ce4bae1ac14f60076d00eafe71af30450ba
char: xillybus: Don't destroy workqueue from work item running on it

Triggered by a kref decrement, destroy_workqueue() may be called from
within a work item for destroying its own workqueue. This illegal
situation is averted by adding a module-global workqueue for exclusive
use of the offending work item. Other work items continue to be queued
on per-device workqueues to ensure performance.

Reported-by: syzbot+91dbdfecdd3287734d8e@syzkaller.appspotmail.com
Cc: stable <stable@kernel.org>
Closes: https://lore.kernel.org/lkml/0000000000000ab25a061e1dfe9f@google.com/
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Link: https://lore.kernel.org/r/20240801121126.60183-1-eli.billauer@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/xillybus/xillyusb.c