]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
bluetooth: btusb: Initialize .owner field of force_poll_sync_fops
authorSalah Triki <salah.triki@gmail.com>
Fri, 21 Feb 2025 21:32:59 +0000 (22:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 12:02:03 +0000 (13:02 +0100)
[ Upstream commit cbf85b9cb80bec6345ffe0368dfff98386f4714f ]

Initialize .owner field of force_poll_sync_fops to THIS_MODULE in order to
prevent btusb from being unloaded while its operations are in use.

Fixes: 800fe5ec302e ("Bluetooth: btusb: Add support for queuing during polling interval")
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bluetooth/btusb.c

index 6bc6dd417adf64707ed547d1bff207b6bc400da2..3a0b9dc98707f58be6774cb02949c5ea1a7e09a0 100644 (file)
@@ -3644,6 +3644,7 @@ static ssize_t force_poll_sync_write(struct file *file,
 }
 
 static const struct file_operations force_poll_sync_fops = {
+       .owner          = THIS_MODULE,
        .open           = simple_open,
        .read           = force_poll_sync_read,
        .write          = force_poll_sync_write,