From: Taehee Yoo <ap420073@gmail.com>
To: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org
Cc: ap420073@gmail.com, David.Laight@aculab.com,
johannes@sipsolutions.net, nstange@suse.de, derosier@gmail.com,
kvalo@codeaurora.org, linux-wireless@vger.kernel.org,
wil6210@qti.qualcomm.com, b43-dev@lists.infradead.org,
linux-bluetooth@vger.kernel.org, michael.hennerich@analog.com,
linux-wpan@vger.kernel.org, stefan@datenfreihafen.org,
inaky.perez-gonzalez@intel.com, linux-wimax@intel.com,
emmanuel.grumbach@intel.com, luciano.coelho@intel.com,
stf_xl@wp.pl, pkshih@realtek.com, ath11k@lists.infradead.org,
ath10k@lists.infradead.org, wcn36xx@lists.infradead.org,
merez@codeaurora.org, pizza@shaftnet.org,
Larry.Finger@lwfinger.net, amitkarwar@gmail.com,
ganapathi.bhat@nxp.com, huxinming820@gmail.com,
marcel@holtmann.org, johan.hedberg@gmail.com,
alex.aring@gmail.com, jukka.rissanen@linux.intel.com,
arend.vanspriel@broadcom.com, franky.lin@broadcom.com,
hante.meuleman@broadcom.com, chung-hsien.hsu@infineon.com,
wright.feng@infineon.com, chi-hsien.lin@infineon.com
Subject: [PATCH net v2 02/21] mac80211: set .owner to THIS_MODULE
Date: Sat, 7 Nov 2020 17:21:33 +0000 [thread overview]
Message-ID: <20201107172152.828-3-ap420073@gmail.com> (raw)
In-Reply-To: <20201107172152.828-1-ap420073@gmail.com>
If THIS_MODULE is not set, the module would be removed while debugfs is
being used.
It eventually makes kernel panic.
Fixes: e9f207f0ff90 ("[MAC80211]: Add debugfs attributes.")
Fixes: 4b7679a561e5 ("mac80211: clean up rate control API")
Fixes: ec8aa669b839 ("mac80211: add the minstrel_ht rate control algorithm")
Fixes: 2cae0b6a70d6 ("mac80211: add new Minstrel-HT statistic output via csv")
Fixes: d0a77c6569ab ("mac80211: allow writing TX PN in debugfs")
Fixes: 8f20fc24986a ("[MAC80211]: embed key conf in key, fix driver interface")
Fixes: a75b4363eaaf ("mac80211: allow controlling aggregation manually")
Fixes: 9399b86c0e9a ("mac80211: add debug knobs for fair queuing")
Fixes: e322c07f8371 ("mac80211: debugfs: improve airtime_flags handler readability")
Fixes: 3ace10f5b5ad ("mac80211: Implement Airtime-based Queue Limit (AQL)")
Fixes: 276d9e82e06c ("mac80211: debugfs option to force TX status frames")
Fixes: 827b1fb44b7e ("mac80211: resume properly, add suspend/resume test")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
---
v1 -> v2:
- Change headline
- Squash patches into per-driver/subsystem
net/mac80211/debugfs.c | 7 +++++++
net/mac80211/debugfs_key.c | 3 +++
net/mac80211/debugfs_netdev.c | 1 +
net/mac80211/debugfs_sta.c | 2 ++
net/mac80211/rate.c | 1 +
net/mac80211/rc80211_minstrel_ht_debugfs.c | 2 ++
6 files changed, 16 insertions(+)
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 90470392fdaa..abbfc1bbdb8b 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -46,6 +46,7 @@ static const struct file_operations name## _ops = { \
.read = name## _read, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
};
#define DEBUGFS_READONLY_FILE(name, fmt, value...) \
@@ -148,6 +149,7 @@ static const struct file_operations aqm_ops = {
.read = aqm_read,
.open = simple_open,
.llseek = default_llseek,
+ .owner = THIS_MODULE,
};
static ssize_t airtime_flags_read(struct file *file,
@@ -201,6 +203,7 @@ static const struct file_operations airtime_flags_ops = {
.read = airtime_flags_read,
.open = simple_open,
.llseek = default_llseek,
+ .owner = THIS_MODULE,
};
static ssize_t aql_txq_limit_read(struct file *file,
@@ -282,6 +285,7 @@ static const struct file_operations aql_txq_limit_ops = {
.read = aql_txq_limit_read,
.open = simple_open,
.llseek = default_llseek,
+ .owner = THIS_MODULE,
};
static ssize_t force_tx_status_read(struct file *file,
@@ -334,6 +338,7 @@ static const struct file_operations force_tx_status_ops = {
.read = force_tx_status_read,
.open = simple_open,
.llseek = default_llseek,
+ .owner = THIS_MODULE,
};
#ifdef CONFIG_PM
@@ -354,6 +359,7 @@ static const struct file_operations reset_ops = {
.write = reset_write,
.open = simple_open,
.llseek = noop_llseek,
+ .owner = THIS_MODULE,
};
#endif
@@ -537,6 +543,7 @@ static const struct file_operations stats_ ##name## _ops = { \
.read = stats_ ##name## _read, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
};
#define DEBUGFS_STATS_ADD(name) \
diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c
index 98a713475e0f..d7c0c28045ef 100644
--- a/net/mac80211/debugfs_key.c
+++ b/net/mac80211/debugfs_key.c
@@ -30,6 +30,7 @@ static const struct file_operations key_ ##name## _ops = { \
.read = key_##name##_read, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
}
#define KEY_OPS_W(name) \
@@ -38,6 +39,7 @@ static const struct file_operations key_ ##name## _ops = { \
.write = key_##name##_write, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
}
#define KEY_FILE(name, format) \
@@ -53,6 +55,7 @@ static const struct file_operations key_ ##name## _ops = { \
.read = key_conf_##name##_read, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
}
#define KEY_CONF_FILE(name, format) \
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index fe8a7a87e513..8efa31ae7334 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -127,6 +127,7 @@ static const struct file_operations name##_ops = { \
.write = (_write), \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
}
#define _IEEE80211_IF_FILE_R_FN(name) \
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 829dcad69c2c..9ce49346c32a 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -34,6 +34,7 @@ static const struct file_operations sta_ ##name## _ops = { \
.read = sta_##name##_read, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
}
#define STA_OPS_RW(name) \
@@ -42,6 +43,7 @@ static const struct file_operations sta_ ##name## _ops = { \
.write = sta_##name##_write, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
}
#define STA_FILE(name, field, format) \
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 45927202c71c..bbb691119a44 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -225,6 +225,7 @@ const struct file_operations rcname_ops = {
.read = rcname_read,
.open = simple_open,
.llseek = default_llseek,
+ .owner = THIS_MODULE,
};
#endif
diff --git a/net/mac80211/rc80211_minstrel_ht_debugfs.c b/net/mac80211/rc80211_minstrel_ht_debugfs.c
index bebb71917742..cdb51aa460a3 100644
--- a/net/mac80211/rc80211_minstrel_ht_debugfs.c
+++ b/net/mac80211/rc80211_minstrel_ht_debugfs.c
@@ -173,6 +173,7 @@ static const struct file_operations minstrel_ht_stat_fops = {
.read = minstrel_stats_read,
.release = minstrel_stats_release,
.llseek = no_llseek,
+ .owner = THIS_MODULE,
};
static char *
@@ -311,6 +312,7 @@ static const struct file_operations minstrel_ht_stat_csv_fops = {
.read = minstrel_stats_read,
.release = minstrel_stats_release,
.llseek = no_llseek,
+ .owner = THIS_MODULE,
};
void
--
2.17.1
next prev parent reply other threads:[~2020-11-07 17:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-07 17:21 [PATCH net v2 00/21] net: avoid to remove module when its debugfs is being used Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 01/21] net: set .owner to THIS_MODULE Taehee Yoo
2020-11-07 17:21 ` Taehee Yoo [this message]
2020-11-07 17:21 ` [PATCH net v2 03/21] cfg80211: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 04/21] netdevsim: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 05/21] ieee802154: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 06/21] i2400m: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 07/21] wlcore: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 08/21] wl1251: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 09/21] iwlwifi: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 10/21] iwlegacy: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 11/21] rtlwifi: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 12/21] ath11k: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 13/21] ath10k: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 14/21] wcn36xx: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 15/21] wil6210: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 16/21] cw1200: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 17/21] brcmfmac: " Taehee Yoo
2020-11-07 17:41 ` Arend Van Spriel
2020-11-07 18:16 ` Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 18/21] b43legacy: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 19/21] b43: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 20/21] mwifiex: mwifiex: " Taehee Yoo
2020-11-07 17:21 ` [PATCH net v2 21/21] Bluetooth: " Taehee Yoo
2020-11-07 19:05 ` [PATCH net v2 00/21] net: avoid to remove module when its debugfs is being used Jakub Kicinski
2020-11-07 19:52 ` Taehee Yoo
2020-11-10 8:32 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201107172152.828-3-ap420073@gmail.com \
--to=ap420073@gmail.com \
--cc=David.Laight@aculab.com \
--cc=Larry.Finger@lwfinger.net \
--cc=alex.aring@gmail.com \
--cc=amitkarwar@gmail.com \
--cc=arend.vanspriel@broadcom.com \
--cc=ath10k@lists.infradead.org \
--cc=ath11k@lists.infradead.org \
--cc=b43-dev@lists.infradead.org \
--cc=chi-hsien.lin@infineon.com \
--cc=chung-hsien.hsu@infineon.com \
--cc=davem@davemloft.net \
--cc=derosier@gmail.com \
--cc=emmanuel.grumbach@intel.com \
--cc=franky.lin@broadcom.com \
--cc=ganapathi.bhat@nxp.com \
--cc=hante.meuleman@broadcom.com \
--cc=huxinming820@gmail.com \
--cc=inaky.perez-gonzalez@intel.com \
--cc=johan.hedberg@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=jukka.rissanen@linux.intel.com \
--cc=kuba@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-wimax@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=luciano.coelho@intel.com \
--cc=marcel@holtmann.org \
--cc=merez@codeaurora.org \
--cc=michael.hennerich@analog.com \
--cc=netdev@vger.kernel.org \
--cc=nstange@suse.de \
--cc=pizza@shaftnet.org \
--cc=pkshih@realtek.com \
--cc=stefan@datenfreihafen.org \
--cc=stf_xl@wp.pl \
--cc=wcn36xx@lists.infradead.org \
--cc=wil6210@qti.qualcomm.com \
--cc=wright.feng@infineon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).