projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2ea295
)
intel_th: msu: Set fops::owner to prevent module from unloading
author
Alexander Shishkin
<
[email protected]
>
Fri, 8 Apr 2016 14:36:04 +0000
(17:36 +0300)
committer
Alexander Shishkin
<
[email protected]
>
Fri, 8 Apr 2016 14:43:34 +0000
(17:43 +0300)
Right now it's possible to unload the msu driver while its character
device is open. Prevent it by setting fops::owner, which will result
in the module reference being held while the device node is open.
Signed-off-by: Alexander Shishkin <
[email protected]
>
Reviewed-by: Laurent Fert <
[email protected]
>
drivers/hwtracing/intel_th/msu.c
patch
|
blob
|
history
diff --git
a/drivers/hwtracing/intel_th/msu.c
b/drivers/hwtracing/intel_th/msu.c
index ee153067e13636178c88443127cfbb7682551779..bcc3b471337746440e8ad2a7fc58d909a4446e70 100644
(file)
--- a/
drivers/hwtracing/intel_th/msu.c
+++ b/
drivers/hwtracing/intel_th/msu.c
@@
-1253,6
+1253,7
@@
static const struct file_operations intel_th_msc_fops = {
.read = intel_th_msc_read,
.mmap = intel_th_msc_mmap,
.llseek = no_llseek,
+ .owner = THIS_MODULE,
};
static int intel_th_msc_init(struct msc *msc)