[3.19.y-ckt stable] Patch "mei: prevent unloading mei hw modules while the device is opened." has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Thu Aug 27 22:08:14 UTC 2015
This is a note to let you know that I have just added a patch titled
mei: prevent unloading mei hw modules while the device is opened.
to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue
This patch is scheduled to be released in version 3.19.8-ckt6.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From 331e6f0f1fea2d20c0da1b3b263ea70d2cd26218 Mon Sep 17 00:00:00 2001
From: Tomas Winkler <tomas.winkler at intel.com>
Date: Thu, 18 Jun 2015 11:41:03 +0300
Subject: mei: prevent unloading mei hw modules while the device is opened.
commit 154322f47376fed6ab1e4b350aa45fffa15a61aa upstream.
chrdev_open() increases reference counter on cdev->owner. Instead of
assigning the owner to mei subsystem, the owner has to be set to the
underlaying HW module (mei_me or mei_txe), so once the device is opened
the HW module cannot be unloaded.
Signed-off-by: Tomas Winkler <tomas.winkler at intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin at intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/misc/mei/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index ae56ba6..f6b68e2 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -738,7 +738,7 @@ int mei_register(struct mei_device *dev, struct device *parent)
/* Fill in the data structures */
devno = MKDEV(MAJOR(mei_devt), dev->minor);
cdev_init(&dev->cdev, &mei_fops);
- dev->cdev.owner = mei_fops.owner;
+ dev->cdev.owner = parent->driver->owner;
/* Add the device */
ret = cdev_add(&dev->cdev, devno, 1);
--
1.9.1
More information about the kernel-team
mailing list