]> git.ipfire.org Git - thirdparty/linux.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)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 27 Feb 2025 21:50:05 +0000 (16:50 -0500)
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>
drivers/bluetooth/btusb.c

index 8149e53fd0a76fbe0749403d1a130b09d46ed350..2a8d91963c63f5f216a380cf2cc32f3409acb835 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,