mei: prevent unloading mei hw modules while the device is opened.
authorTomas Winkler <tomas.winkler@intel.com>
Thu, 18 Jun 2015 08:41:03 +0000 (11:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2015 04:31:05 +0000 (21:31 -0700)
commit154322f47376fed6ab1e4b350aa45fffa15a61aa
treee89be0738fb519dc975b6403804d8ed1a2bbc7f0
parenta63444375f08a18a6b2286351606f08d6e9fa63d
mei: prevent unloading mei hw modules while the device is opened.

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.

Cc: <stable@vger.kernel.org> #3.17+
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/main.c