summaryrefslogtreecommitdiffstats
path: root/drivers/net/netdevsim/dev.c
diff options
context:
space:
mode:
authorTaehee Yoo <ap420073@gmail.com>2020-11-15 11:30:41 +0100
committerJakub Kicinski <kuba@kernel.org>2020-11-17 23:08:59 +0100
commita5bbcbf29089a1252c201b1a7fd38151de355db9 (patch)
tree701f2df0e13232e7cb174988cb6d283bf205157b /drivers/net/netdevsim/dev.c
parentenetc: Workaround for MDIO register access issue (diff)
downloadlinux-a5bbcbf29089a1252c201b1a7fd38151de355db9.tar.xz
linux-a5bbcbf29089a1252c201b1a7fd38151de355db9.zip
netdevsim: set .owner to THIS_MODULE
If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: 82c93a87bf8b ("netdevsim: implement couple of testing devlink health reporters") Fixes: 424be63ad831 ("netdevsim: add UDP tunnel port offload support") Fixes: 4418f862d675 ("netdevsim: implement support for devlink region and snapshots") Fixes: d3cbb907ae57 ("netdevsim: add ACL trap reporting cookie as a metadata") Signed-off-by: Taehee Yoo <ap420073@gmail.com> Link: https://lore.kernel.org/r/20201115103041.30701-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/netdevsim/dev.c')
-rw-r--r--drivers/net/netdevsim/dev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c
index d07061417675..e7972e88ffe0 100644
--- a/drivers/net/netdevsim/dev.c
+++ b/drivers/net/netdevsim/dev.c
@@ -96,6 +96,7 @@ static const struct file_operations nsim_dev_take_snapshot_fops = {
.open = simple_open,
.write = nsim_dev_take_snapshot_write,
.llseek = generic_file_llseek,
+ .owner = THIS_MODULE,
};
static ssize_t nsim_dev_trap_fa_cookie_read(struct file *file,
@@ -188,6 +189,7 @@ static const struct file_operations nsim_dev_trap_fa_cookie_fops = {
.read = nsim_dev_trap_fa_cookie_read,
.write = nsim_dev_trap_fa_cookie_write,
.llseek = generic_file_llseek,
+ .owner = THIS_MODULE,
};
static int nsim_dev_debugfs_init(struct nsim_dev *nsim_dev)